/* =========================================================
   KOLFLAATH — investor · styremedlem · kommersiell rådgiver
   Supreme (variable) · blågrønn (teal) dominant · premium editorial
   ========================================================= */

@font-face {
  font-family: "Supreme";
  src: url("assets/fonts/Supreme-Variable.woff2") format("woff2"),
       url("assets/fonts/Supreme-Variable.woff") format("woff");
  font-weight: 100 800;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Supreme";
  src: url("assets/fonts/Supreme-VariableItalic.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  font-style: italic;
}

:root {
  --teal:      #022C38;   /* mørk teal — brand, accent surface */
  --teal-deep: #022C38;   /* footer — same dark teal (palette has one dark shade) */
  --paper:     #F2F4F6;   /* lys sand — dominant canvas */
  --accent:    #56B6C7;   /* lys teal — accent on sand */

  /* contextual tokens (default = on SAND); .on-teal flips them */
  --fg:  #022C38;
  --mut: rgba(2, 44, 56, 0.62);
  --line:rgba(2, 44, 56, 0.18);
  --line-soft: rgba(2, 44, 56, 0.09);
  --bg:  var(--paper);

  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 80px);
  --fs-eyebrow: 0.72rem;
}

.on-teal {
  --fg:  #F2F4F6;
  --mut: rgba(242, 244, 246, 0.60);
  --line:rgba(242, 244, 246, 0.18);
  --line-soft: rgba(242, 244, 246, 0.10);
  --accent: #56B6C7;
  --bg:  var(--teal);
  background: var(--bg);
  color: var(--fg);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--fg);
  font-family: "Supreme", system-ui, sans-serif;
  font-weight: 400;
  font-feature-settings: "ss01", "liga", "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* subtle paper grain over the whole page, regardless of section color */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

::selection { background: var(--teal); color: var(--paper); }
.on-teal ::selection { background: var(--paper); color: var(--teal); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- shared atoms --------------------------------------- */

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.display { font-weight: 550; line-height: 0.98; letter-spacing: -0.028em; margin: 0; }
.italic { font-style: italic; font-weight: 400; }

section { padding-block: clamp(4rem, 9vw, 8.5rem); }
.section__head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__head h2 { font-size: clamp(2rem, 5.2vw, 4.2rem); margin: 0.6rem 0 0; }

/* ---- header --------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  --fg:  #56B6C7;
  --mut: rgba(86, 182, 199, 0.62);
  --line: rgba(86, 182, 199, 0.22);
  --line-soft: rgba(86, 182, 199, 0.12);
  background: var(--teal);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; display: block; }
@media (max-width: 520px) { .brand img { height: 20px; } }

.nav { display: flex; gap: clamp(1.4rem, 3vw, 2.6rem); align-items: center; }
.nav a {
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--mut);
  position: relative; padding-block: 0.4rem;
  transition: color 0.25s ease;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--fg);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.nav a:hover { color: var(--fg); }
.nav a:hover::after { transform: scaleX(1); }
.nav__cta { border: 1px solid var(--line); border-radius: 100px; padding: 0.5rem 1.1rem !important; color: var(--fg) !important; }
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--accent); color: var(--teal) !important; border-color: var(--accent); }
@media (max-width: 720px) { .nav a:not(.nav__cta) { display: none; } }

/* ---- hero (logo only) ------------------------------------ */

.hero {
  min-height: min(72vh, 640px);
  display: flex; align-items: center; justify-content: center;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.hero__stack { display: flex; flex-direction: column; align-items: center; gap: clamp(1.3rem, 3vw, 2.2rem); }

.hero__title { font-size: clamp(3rem, 10vw, 9.5rem); }
.hero__title .italic { color: var(--accent); }

/* hero as logo (brand mark is the headline) — light fade+rise, no mask */
.hero__logo { font-size: 0; line-height: 0; }
.hero__logo img { width: min(1080px, 88vw); height: auto; display: block; will-change: opacity, transform; }

.hero__tagline {
  margin: 0;
  max-width: 42ch;
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.45;
  color: var(--mut);
}

/* ---- about band (the one teal section) ------------------- */

.about__grid {
  display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
@media (min-width: 880px) { .about__grid { grid-template-columns: 1fr 0.82fr; } }
.about__lead { font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.4; font-weight: 400; max-width: 32ch; margin: 1.2rem 0 0; color: var(--fg); }
.about__lead .em { color: var(--accent); font-style: italic; }
.hero__cta { margin-top: 2rem; display: inline-flex; align-items: baseline; gap: 0.6rem; font-size: 1.05rem; }
.hero__cta .arrow { transition: transform 0.3s ease; }
.hero__cta:hover .arrow { transform: translateX(4px); }
.hero__cta .u { border-bottom: 1px solid var(--line); padding-bottom: 2px; }

.hero__portrait { position: relative; overflow: hidden; border: 1px solid var(--line); background: rgba(0,0,0,0.1); }
.hero__portrait img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: center 22%; will-change: transform; }

/* ---- experience ----------------------------------------- */

.exp__intro { font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.45; max-width: 40ch; margin: 0 0 clamp(1.5rem, 4vw, 2.5rem); color: var(--mut); }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tl {
  display: grid; grid-template-columns: 1fr; gap: 0.7rem; align-items: center;
  padding-block: clamp(1.6rem, 3.5vw, 2.3rem); border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s cubic-bezier(.2,.7,.2,1);
}
.tl:hover { padding-left: clamp(0.5rem, 2vw, 1.2rem); }
@media (min-width: 720px) { .tl { grid-template-columns: 200px 1fr auto; gap: clamp(1.5rem, 4vw, 3rem); } }
.tl__logo { display: flex; align-items: center; height: 30px; }
.tl__logo img { max-height: 26px; max-width: 150px; width: auto; object-fit: contain;
  opacity: 0.92; transition: opacity 0.35s ease; }
.tl:hover .tl__logo img { opacity: 1; }
.tl__logo--text { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; color: var(--fg); opacity: 0.6; }
.tl:hover .tl__logo--text { opacity: 1; }
/* colour tile (God Dag) — square brand mark, stays in colour */
.tl__logo--tile { height: auto; }
.tl__logo--tile img { max-height: 44px; max-width: 44px; border-radius: 8px; filter: none; opacity: 0.9; transition: opacity 0.35s ease; }
.tl:hover .tl__logo--tile img { opacity: 1; }
.tl__role { font-size: clamp(1rem, 1.5vw, 1.18rem); color: var(--fg); font-weight: 450; }
.tl__role .sub { color: var(--mut); }
.tl__years { font-size: 0.9rem; color: var(--mut); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- contact -------------------------------------------- */

.contact__big { font-size: clamp(2.4rem, 8vw, 6.5rem); font-weight: 550; letter-spacing: -0.03em; line-height: 1; margin: clamp(2rem,5vw,3rem) 0 0; }
.contact__mail { display: inline-block; position: relative; color: var(--accent); }
.contact__mail::after { content:""; position:absolute; left:0; bottom: 0.06em; height: 2px; width: 100%; background: currentColor; transform: scaleX(0.001); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.contact__mail:hover::after { transform: scaleX(1); }
.contact__intro { font-size: clamp(1.1rem, 1.9vw, 1.4rem); line-height: 1.45; max-width: 40ch; margin: 1.8rem 0 0; color: var(--fg); }
.contact__grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: clamp(2.5rem,5vw,4rem); border-top: 1px solid var(--line); padding-top: 2rem; }
@media (min-width: 480px) { .contact__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .contact__grid { grid-template-columns: repeat(4, 1fr); } }
.contact__col h4 { font-size: var(--fs-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; color: var(--mut); font-weight: 500; margin: 0 0 0.8rem; }
.contact__col a, .contact__col p { margin: 0.2rem 0; font-size: 1.02rem; }
.contact__col a:hover { color: var(--accent); }

/* ---- footer --------------------------------------------- */

.site-footer {
  background: var(--teal-deep);
  color: #F2F4F6;
  --fg: #F2F4F6; --mut: rgba(242, 244, 246, 0.60); --line-soft: rgba(242, 244, 246, 0.10);
  border-top: 1px solid var(--line-soft);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; padding-block: 2.2rem; font-size: 0.78rem; letter-spacing: 0.05em; color: var(--mut); }
.site-footer .footer-logo { height: 15px; width: auto; }
.site-footer a:hover { color: var(--fg); }

/* ---- reveal animation (driven by GSAP) ------------------ */
.gsap-ready [data-reveal] { opacity: 0; }
.gsap-ready .hero__title { opacity: 0; }
.gsap-ready .hero__tagline { opacity: 0; }
.hero__portrait img { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
