/* ==========================================================================
   KOMA BUSINESS · Founder
   A founder letter. The writing is the experience; motion only supports it.
   Type scale follows the live insidekoma.com/pages/founder build.
   ========================================================================== */

.page-founder {
  --fd-teal: #021e1c;
  --fd-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fd-rise: 12px;
  --fd-dim: rgba(230, 230, 230, 0.84);
}

/* Shared atmosphere: near-black into deep teal at the hero's base, then back
   to black as the note is read. One surface, no visible section edges.
   ========================================================================== */

.fd-surface {
  position: relative;
  isolation: isolate;
  background: var(--bg);
}

/* Fine grain dithers the long, low-contrast gradients so they never band. */
.fd-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  /* Grain fades out with the teal so the surface meets the CTA seamlessly */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 75%);
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 75%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Hero
   ========================================================================== */

.fd-hero {
  position: relative;
  min-height: max(820px, 100svh);
  padding: clamp(230px, 31svh, 300px) 31px 180px;
  text-align: center;
}

/* Section tones sit beneath the seam glow (all layers share .fd-surface) */
.fd-hero::before,
.fd-note::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.fd-hero::before {
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    var(--bg) 34%,
    #091110 56%,
    #061614 72%,
    #041a18 86%,
    var(--fd-teal) 100%
  );
}

/* A faint teal breath across the seam between hero and note */
.fd-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -360px;
  height: 720px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(60% 50% at 50% 50%, rgba(0, 63, 54, 0.22) 0%, rgba(0, 63, 54, 0.08) 45%, rgba(0, 63, 54, 0) 100%);
}

.fd-hero__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  will-change: transform, opacity;
}

.fd-hero__eyebrow {
  font-size: 16px;
}

.fd-hero__title {
  margin-bottom: 20px;
  color: var(--text);
  font-size: 76px;
  font-weight: 600;
  line-height: 1.3;
}

.fd-hero__lead {
  color: var(--text-muted);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
}

/* Load-in: one slow rise, lightly staggered */
@keyframes fd-rise {
  from {
    opacity: 0;
    transform: translate3d(0, var(--fd-rise), 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .fd-in {
    animation: fd-rise 1650ms var(--fd-ease) var(--d, 0ms) both;
  }
}

/* Founder note
   ========================================================================== */

.fd-note {
  position: relative;
  padding: 90px 31px 180px;
  text-align: center;
}

.fd-note::before {
  background: linear-gradient(
    180deg,
    var(--fd-teal) 0%,
    #041a18 12%,
    #061614 26%,
    #081210 42%,
    #090e0d 58%,
    var(--bg) 78%,
    var(--bg) 100%
  );
}

.fd-note__inner {
  max-width: 830px;
  margin: 0 auto;
}

.fd-note__head {
  margin-bottom: 110px;
}

.fd-note__name {
  color: var(--text);
  font-size: 50px;
  font-weight: 600;
  line-height: 1.3;
}

.fd-note__role {
  margin-top: 4px;
  color: var(--text);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.3;
}

.fd-note__p,
.fd-close__line {
  color: var(--text);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.8;
  transition: color 1200ms var(--fd-ease);
}

.fd-note__p + .fd-note__p {
  margin-top: 80px;
}

/* Closing: more air than a paragraph, then the signature of a letter */
.fd-close {
  padding-top: 170px;
}

.fd-close__line {
  font-weight: 500;
}

.fd-close__sign {
  margin-top: 96px;
}

.fd-close__name,
.fd-close__role {
  display: block;
  color: var(--text);
}

.fd-close__name {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}

.fd-close__role {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
}

/* Paragraph reveal: once, barely noticeable */
.js .fd-reveal {
  opacity: 0.4;
  transform: translate3d(0, var(--fd-rise), 0);
  transition:
    opacity 1500ms var(--fd-ease),
    transform 1500ms var(--fd-ease),
    color 1200ms var(--fd-ease);
}

.js .fd-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* The closing arrives slower; the signature follows it */
.js .fd-close .fd-close__line,
.js .fd-close .fd-close__sign {
  opacity: 0;
  transform: translate3d(0, var(--fd-rise), 0);
  transition:
    opacity 1800ms var(--fd-ease),
    transform 1800ms var(--fd-ease),
    color 1200ms var(--fd-ease);
}

.js .fd-close .fd-close__sign {
  transition-duration: 1600ms, 1600ms, 1200ms;
  transition-delay: 650ms, 650ms, 0ms;
}

.js .fd-close.is-in .fd-close__line,
.js .fd-close.is-in .fd-close__sign {
  opacity: 1;
  transform: none;
}

/* Reading focus (desktop pointers only, set by founder.js): the paragraph at
   the centre of the view stays full; the rest ease back very slightly. */
.fd-note.is-reading .fd-note__p:not(.is-current),
.fd-note.is-reading .fd-close__line:not(.is-current) {
  color: var(--fd-dim);
}

/* Final CTA (mirrors the approved Ecosystem closing)
   ========================================================================== */

.fd-final {
  padding: 317px 31px 282px;
  background: var(--bg);
  text-align: center;
}

.fd-final__title {
  margin-bottom: 20px;
  color: var(--text);
  font-size: 61px;
  font-weight: 600;
  line-height: 1;
}

.fd-final__text {
  margin-bottom: 79px;
  color: var(--text-muted);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.3;
}

.fd-final__text strong {
  color: var(--text);
  font-weight: 500;
}

/* Tablet / small laptop
   ========================================================================== */

@media (max-width: 1100px) {
  .fd-hero__title {
    font-size: clamp(52px, 6.4vw, 76px);
  }

  .fd-hero__lead {
    font-size: 19px;
  }

  .fd-note__inner {
    max-width: 760px;
  }

  .fd-note__name {
    font-size: clamp(44px, 4.6vw, 50px);
  }

  .fd-note__p,
  .fd-close__line {
    font-size: 21px;
  }
}

@media (max-width: 900px) {
  .fd-hero {
    min-height: max(760px, 100svh);
  }

  .fd-note__inner {
    max-width: 640px;
  }

  .fd-note__head {
    margin-bottom: 90px;
  }

  .fd-note__role {
    font-size: 22px;
  }

  .fd-note__p,
  .fd-close__line {
    font-size: 20px;
  }

  .fd-note__p + .fd-note__p {
    margin-top: 64px;
  }
}

/* Mobile: large editorial type, long calm rhythm
   ========================================================================== */

@media (max-width: 767px) {
  .fd-hero {
    min-height: max(720px, 100svh);
    padding: max(250px, 44svh) 16px 150px;
  }

  .fd-hero__eyebrow {
    font-size: 16px;
  }

  .fd-hero__title {
    margin-bottom: 19px;
    font-size: min(41px, 9.8vw);
  }

  .fd-hero__lead {
    font-size: 16px;
    line-height: 1.8;
  }

  .fd-hero::after {
    bottom: -240px;
    height: 480px;
    background: radial-gradient(80% 50% at 50% 50%, rgba(0, 63, 54, 0.2) 0%, rgba(0, 63, 54, 0.07) 45%, rgba(0, 63, 54, 0) 100%);
  }

  .fd-note {
    padding: 100px 30px 170px;
  }

  .fd-note__inner {
    max-width: 480px;
  }

  .fd-note__head {
    margin-bottom: 70px;
  }

  .fd-note__name {
    font-size: 41px;
  }

  .fd-note__role {
    margin-top: 2px;
    font-size: 24px;
  }

  .fd-note__p,
  .fd-close__line {
    font-size: clamp(20px, 5.3vw, 23px);
  }

  .fd-note__p + .fd-note__p {
    margin-top: 60px;
  }

  .fd-close {
    padding-top: 130px;
  }

  .fd-close__sign {
    margin-top: 80px;
  }

  .fd-close__name {
    font-size: 36px;
  }

  .fd-close__role {
    margin-top: 4px;
    font-size: 15px;
  }

  .fd-final {
    padding: 317px 16px 323px;
  }

  .fd-final__title {
    margin-bottom: 19px;
    font-size: 41px;
    line-height: 1.3;
  }

  .fd-final__text {
    margin-bottom: 40px;
    font-size: 15px;
    line-height: 1.8;
  }
}

@media (max-width: 380px) {
  .fd-note {
    padding-left: 24px;
    padding-right: 24px;
  }

  .fd-note__name,
  .fd-final__title {
    font-size: 36px;
  }

  .fd-close__name {
    font-size: 32px;
  }
}

/* Reduced motion: everything present, nothing moves
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .js .fd-in {
    animation: none;
  }

  .js .fd-reveal,
  .js .fd-close .fd-close__line,
  .js .fd-close .fd-close__sign {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .fd-hero__inner {
    will-change: auto;
  }

  .fd-note.is-reading .fd-note__p:not(.is-current),
  .fd-note.is-reading .fd-close__line:not(.is-current) {
    color: var(--text);
  }
}
