:root {
  --red: #254049;
  --cream: #c0bfbf;
  --gray: #bbbaba;
  --ink: #403f3f;
  --ink-soft: #676565;
  --placeholder: #817e7e;
  --on-red-soft: #d9d8d8;
  --btn-label: #cccccc;
  --maxw: 1366px;
  --pad-x: clamp(24px, 4vw, 80px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: auto; }

/* Global SVG noise grain overlay — paints over every surface including the navbar
   so red bands (topnav, hero, lets-talk, menu) share the same filmic grain. */
body::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 51;
  opacity: 0.45;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='360' height='360' viewBox='0 0 360 360'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.85 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 360px 360px;
}
body {
  font-family: "Rethink Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;        /* clip horizontal overflow without making body a scroll container */
  position: relative;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* -------- TOP NAV -------- */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 80px;
  background: var(--red);
  color: var(--cream);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad-x);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 22px;
  transform: translateY(-100%);
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.topnav__logo { grid-column: 2; justify-self: center; }
.topnav__toggle { grid-column: 3; justify-self: end; }
.topnav.is-visible { transform: translateY(0); }

/* -------- SHARED RED-BAND NOISE TEXTURE --------
   Applied to every red surface (topnav, hero, lets-talk, nav-overlay) so
   they share the same filmic grain — matches the look of the open menu. */
.topnav::after,
.hero::after,
.lets-talk::after,
.nav-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='360' height='360' viewBox='0 0 360 360'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.85 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 360px 360px;
}
/* Keep section content above the noise overlay */
.topnav > *,
.lets-talk__inner { position: relative; z-index: 2; }
.hero__inner { position: relative; z-index: 2; }
.topnav__logo img { height: 32px; width: auto; display: block; }
.topnav__links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.5vw, 48px);
}
.topnav__links a {
  color: var(--cream);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 0.08em;
  padding-bottom: 0.16em;
  transition: background-size .35s cubic-bezier(0.22, 1, 0.36, 1);
}
.topnav__links a:hover,
.topnav__links a:focus-visible { background-size: 100% 0.08em; }
.topnav__lang { display: inline-flex; align-items: center; gap: 10px; }
.topnav__lang .is-active { opacity: 1; }
.topnav__divider { opacity: 0.7; }

/* -------- BURGER TOGGLE -------- */
.topnav__toggle {
  position: relative;
  width: 40px;
  height: 32px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  color: var(--cream);
  z-index: 2; /* above ::after noise overlay inside topnav */
}
.topnav__toggle span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: top .35s cubic-bezier(0.22, 1, 0.36, 1),
              bottom .35s cubic-bezier(0.22, 1, 0.36, 1),
              transform .35s cubic-bezier(0.22, 1, 0.36, 1);
}
.topnav__toggle span:first-child { top: 11px; }
.topnav__toggle span:last-child  { bottom: 11px; }
.topnav__toggle[aria-expanded="true"] span:first-child {
  top: 15px;
  transform: rotate(45deg);
}
.topnav__toggle[aria-expanded="true"] span:last-child {
  bottom: 15px;
  transform: rotate(-45deg);
}

/* -------- NAV OVERLAY -------- */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 49;            /* one below topnav so the burger stays clickable */
  background: var(--red);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
/* Noise grain for .nav-overlay::after is set in the shared red-band rule above */
.nav-overlay__menu {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vh, 56px);
  z-index: 1;
}
.nav-overlay__menu a {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 600;
  color: var(--cream);
  text-transform: capitalize;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 0.06em;
  padding-bottom: 0.16em;
  transform: translateY(20px);
  opacity: 0;
  transition: background-size .35s cubic-bezier(0.22, 1, 0.36, 1),
              transform .5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity .5s ease;
}
.nav-overlay.is-open .nav-overlay__menu a {
  transform: translateY(0);
  opacity: 1;
}
/* Stagger each link's entrance */
.nav-overlay.is-open .nav-overlay__menu a:nth-child(1) { transition-delay: .08s; }
.nav-overlay.is-open .nav-overlay__menu a:nth-child(2) { transition-delay: .16s; }
.nav-overlay.is-open .nav-overlay__menu a:nth-child(3) { transition-delay: .24s; }
.nav-overlay.is-open .nav-overlay__menu a:nth-child(4) { transition-delay: .32s; }
.nav-overlay__menu a:hover,
.nav-overlay__menu a:focus-visible { background-size: 100% 0.06em; }

/* Establish main as a stacking context above the sticky footer */
main { position: relative; z-index: 1; background: var(--cream); }

/* -------- HERO -------- */
.hero {
  background: var(--red);
  color: var(--cream);
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(80px, 12vh, 160px) var(--pad-x);
  overflow: hidden;
  position: sticky;
  top: 0;
  z-index: 0;
}
/* Subsequent sections sit above the sticky hero and cover it as the user scrolls */
main > section:not(.hero) {
  position: relative;
  z-index: 1;
  background: var(--cream);
}
main > section.lets-talk { background: var(--red); }
.section-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
/* Hide NeatGradient free-tier watermark */
a[data-n="1"],
a[href*="neat.firecms.co"] { display: none !important; }
.hero__inner,
.lets-talk__inner { position: relative; z-index: 1; }
.hero__inner {
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(48px, 8vh, 120px);
}
.hero__logo {
  width: min(793px, 70vw);
  max-width: 100%;
  height: auto;
  overflow: visible;
  will-change: transform;
  display: block;
}
.wordmark { color: var(--cream); pointer-events: none; user-select: none; }

/* Intro typography (ported from Coming Soon Page 2) */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.7rem, 2.8vw, 2.45rem);
}
.intro__title {
  max-width: 64rem;
  margin: 0;
  font-size: clamp(2.6rem, 3vw, 3.6rem);
  font-weight: 600;
  line-height: 1.17;
  color: var(--cream);
  text-align: center;
}
.intro__title span { display: inline; }
/* Hero CTA — pill button (matches .btn--light from the let's-talk section) */
.intro__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1vw, 0.9rem);
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: clamp(1.1rem, 1.4vw, 1.6rem);
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.intro__cta:hover,
.intro__cta:focus-visible { background: #fff; transform: translateY(-2px); }
.intro__cta-arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.intro__cta:hover .intro__cta-arrow,
.intro__cta:focus-visible .intro__cta-arrow { transform: translateX(4px); }

/* Animated scroll-down indicator */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(40px, 7vh, 80px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  z-index: 2;
  opacity: 0;            /* GSAP fades this in at end of entrance timeline */
  transition: color .2s ease;
}
.hero__scroll svg {
  animation: scrollBounce 1.8s cubic-bezier(0.55, 0, 0.55, 1) infinite;
  will-change: transform;
}
.hero__scroll:hover { color: #fff; }
@keyframes scrollBounce {
  0%   { transform: translateY(-2px); opacity: 0.4; }
  50%  { transform: translateY(4px);  opacity: 0.85; }
  100% { transform: translateY(-2px); opacity: 0.4; }
}

/* -------- SECTION WRAPPER -------- */
.section { padding: clamp(80px, 12vh, 160px) var(--pad-x); }
.section__inner { max-width: var(--maxw); margin: 0 auto; }
.section__title {
  font-size: clamp(48px, 6vw, 64px);
  font-weight: 600;
  margin: 0 0 60px;
  letter-spacing: -0.01em;
  color: #1E333A;
  overflow: hidden;
  line-height: 1.1;
  text-transform: capitalize;
  text-align: center;
}
.section__title .word { display: inline-block; }

/* Title case for all sub-headings and footer column titles */
.service h3,
.step h3,
.footer__col h4,
.field__label {
  text-transform: capitalize;
}

/* -------- MANIFESTO -------- */
.manifesto__grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 752px);
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
  justify-content: center;
}
.manifesto__photo {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 9 / 16;
  background: #2a2a2a;
  position: relative;
}
.manifesto__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.manifesto__copy { font-size: clamp(18px, 1.5vw, 28px); line-height: 1.5; max-width: 752px; }
.manifesto__copy p { margin: 0 0 1.2em; }
.manifesto__copy p a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.manifesto__copy strong { font-weight: 600; }

/* -------- BUTTONS -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 24px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn--filled {
  background: var(--red);
  color: var(--btn-label);
}
.btn--filled:hover { background: #1E333A; transform: translateY(-2px); }
.btn--light {
  background: var(--cream);
  color: var(--ink);
}
.btn--light:hover { background: #fff; transform: translateY(-2px); }
.btn[type="submit"] { margin-top: 8px; align-self: flex-start; }

/* -------- MARQUEE -------- */
.marquee {
  overflow: hidden;
  padding: clamp(80px, 12vh, 160px) 0;
  background: var(--cream);
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 80px;
  white-space: nowrap;
  will-change: transform;
}
.marquee__item, .marquee__dot {
  font-size: clamp(64px, 8vw, 96px);
  font-weight: 500;
  color: #1E333A;
  line-height: 1;
}
.marquee__dot { padding: 0 0; }

/* -------- DIVIDER between how→form (matches the marquee text color) -------- */
.form { border-top: 2px solid #1E333A; }

/* -------- SERVICES -------- */
.services__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px 60px;
}
.service h3 {
  font-size: 40px;
  font-weight: 600;
  margin: 0 0 24px;
  color: #1E333A;
}
.service p {
  font-size: 20px;
  line-height: 1.55;
  margin: 0;
  max-width: 560px;
}

/* -------- LET'S TALK -------- */
.lets-talk {
  background: var(--red);
  color: var(--cream);
  padding: clamp(80px, 14vh, 160px) var(--pad-x);
  overflow: hidden;
  position: relative;
}
.lets-talk__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: clamp(40px, 8vw, 124px);
  align-items: start;
}
.lets-talk__wordmark {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
  will-change: transform;
}
.lets-talk__copy { font-size: clamp(20px, 1.8vw, 32px); line-height: 1.4; max-width: 690px; color: var(--on-red-soft); }
.lets-talk__copy p { margin: 0 0 1em; }
.lets-talk__copy p:first-child { color: var(--cream); }
.lets-talk__copy .btn { margin-left: -28px; margin-top: 8px; }

/* -------- HOW WE WORK -------- */
.how__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
}
.step h3 { font-size: 40px; font-weight: 600; margin: 0 0 24px; color: #1E333A; }
.step p { font-size: 20px; line-height: 1.55; margin: 0; }

/* -------- FORM -------- */
.form { padding-bottom: calc(clamp(80px, 12vh, 160px) * 2); }
.form__body {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 600px;
  margin: 0 auto;
}
.field { display: flex; flex-direction: column; gap: 10px; }
.field__label {
  font-size: 28px;
  font-weight: 600;
  color: #1E333A;
}
.field input, .field textarea {
  background: var(--gray);
  border: none;
  border-radius: 4px;
  padding: 18px 22px;
  font-size: 20px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: box-shadow .2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:focus, .field textarea:focus { box-shadow: 0 0 0 2px var(--red); }
.field textarea { resize: vertical; min-height: 140px; line-height: 1.4; }
/* Form status banner — hidden when empty, animated in when shown */
.form__status {
  margin: 28px 0 0;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.form__status:empty { display: none; }

.form__status[data-state="pending"] {
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(64, 63, 63, 0.05);
  color: var(--ink-soft);
}

.form__status[data-state="success"] {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  border-radius: 16px;
  background: var(--red);
  color: var(--cream);
  font-weight: 600;
  animation: statusIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.form__status[data-state="success"]::before {
  content: '';
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--cream);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'><path d='M3 8.5l3 3 7-7' stroke='%23742e32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}

.form__status[data-state="error"] {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 12px;
  background: #fbecea;
  color: #8a2620;
  border: 1px solid #ebc7c2;
  animation: statusIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.form__status[data-state="error"]::before {
  content: '!';
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #8a2620;
  color: #fbecea;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}

/* When the form is in success state, hide the fields & button so the card stands alone */
.form__body.is-sent .field,
.form__body.is-sent button[type="submit"] { display: none; }

@keyframes statusIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -------- FOOTER --------
   Sticky-bottom pinned beneath the page. The form section above (z-index 1)
   covers it; as the user scrolls past the form, the footer is revealed
   from underneath — the mirror of the hero's stick-and-cover pattern. */
.footer {
  background: var(--gray);
  color: var(--ink);
  padding: 80px var(--pad-x) 16px;
  position: sticky;
  bottom: 0;
  z-index: 0;
}
.footer__inner {
  max-width: 1820px;
  margin: 0 auto 40px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer__col { display: flex; flex-direction: column; gap: 14px; }
.footer__col h4 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 14px;
  color: #1E333A;
}
.footer__col a {
  font-size: 20px;
  color: var(--ink);
  text-transform: capitalize;
  align-self: flex-start;     /* shrink underline track to text width, not full column */
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 0.08em;
  padding-bottom: 0.16em;
  transition: background-size .35s cubic-bezier(0.22, 1, 0.36, 1);
}
.footer__col a:hover,
.footer__col a:focus-visible { background-size: 100% 0.08em; }
/* Keep the costas.design brand-domain link in its natural casing, same weight as email */
.footer__col a[href="https://costas.design"] { text-transform: none; font-weight: 600; }
/* Email stays lowercase, weight 600 */
.footer__col a[href^="mailto:"] { text-transform: none; font-weight: 600; }
/* The "coming soon" placeholder is not a real link — no underline */
.footer__col--muted { background-image: none !important; }
.footer__col--muted { opacity: 0.55; cursor: default; pointer-events: none; font-style: italic; }
.footer__wordmark {
  /* Full-bleed: extend beyond the footer's horizontal padding to span the viewport */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 60px;
  margin-bottom: 16px;
  padding: 20px 0;
}
.footer__wordmark img {
  width: 100%;
  height: auto;
  filter: brightness(0) invert(0.8);
  will-change: transform;
}
.footer__copyright {
  text-align: center;
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* -------- REVEAL DEFAULTS --------
   No CSS pre-hide. GSAP .from() handles initial state when JS is ready;
   without JS the content remains visible. */

/* -------- RESPONSIVE -------- */
@media (max-width: 900px) {
  .manifesto__grid { grid-template-columns: 1fr; }
  .services__grid { grid-template-columns: 1fr; gap: 50px; }
  .how__grid { grid-template-columns: 1fr; gap: 40px; }
  .lets-talk__inner { grid-template-columns: 1fr; }
  .footer__inner { justify-content: flex-start; gap: 40px; }
  .footer__col { flex: 0 0 calc(50% - 20px); }
  .topnav__links { gap: 16px; font-size: 16px; flex-wrap: wrap; justify-content: flex-end; }
  .topnav { padding: 20px 24px; }
  /* Disable the sticky reveal-from-below on mobile so the taller stacked footer
     (Contact / Selected Works / Other Work / Social columns wrap on small screens)
     can be scrolled through in full. */
  .footer { position: static; }
}
@media (max-width: 520px) {
  .footer__col { flex: 0 0 100%; }
  .topnav__logo img { height: 24px; }
}
