/* ============================================================
   Cerullium landing site
   Mobile-first. Scales to desktop at >=768px / >=1024px.
   ============================================================ */

:root {
  --blue:        #a2bad6;
  --gold:        #bca544;
  --orange:      #e26434;
  --pink:        #e68a8d;
  --gray:        #595959;
  --gray-light:  #9b9b9b;
  --ink:         #2e0607;
  --cream:       #f6f1d8;
  --white:       #ffffff;

  --maxw: 1180px;
  --pad: clamp(20px, 6vw, 96px);
  --header-h: 64px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  font-family: "Figtree", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  background: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* Long display words should never force a horizontal scrollbar. */
.display, .section-title, .cta-title, .intro, .testimonial blockquote {
  overflow-wrap: break-word;
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  position: relative;
  z-index: 2;
}

/* ---------- Logo mark (icon.svg used as a recolorable mask) ---------- */
.logo-mark {
  display: inline-block;
  width: 38px;
  aspect-ratio: 297 / 348;
  background-color: currentColor;
  -webkit-mask: url("../assets/icon.svg") center / contain no-repeat;
          mask: url("../assets/icon.svg") center / contain no-repeat;
}
.logo-mark--xl {
  width: clamp(120px, 34vw, 190px);
}
.logo-mark--panel {
  width: 100%;
  height: 100%;
}

/* ============================================================
   Fixed header + nav
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-inline: var(--pad);
  z-index: 60;
  background: transparent;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.scrolled {
  background: var(--blue);
  box-shadow: 0 1px 0 rgba(46, 6, 7, 0.08);
}

.menu-toggle {
  --bar: var(--white);
  position: relative;
  width: 42px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  align-content: center;
  gap: 7px;
  z-index: 90;
}
.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  background: var(--bar);
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), background-color 0.4s var(--ease);
}
.menu-toggle[aria-expanded="true"] { --bar: var(--white); }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.nav-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--ink);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease);
}
.nav-panel.open { opacity: 1; visibility: visible; }
.nav-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.nav-panel li { overflow: hidden; }
.nav-panel a {
  display: inline-block;
  color: var(--cream);
  text-decoration: none;
  font-size: clamp(2rem, 9vw, 3.4rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  transform: translateY(110%);
  transition: transform 0.5s var(--ease), color 0.25s var(--ease);
}
.nav-panel.open a { transform: translateY(0); }
.nav-panel li:nth-child(2) a { transition-delay: 0.05s; }
.nav-panel li:nth-child(3) a { transition-delay: 0.1s; }
.nav-panel li:nth-child(4) a { transition-delay: 0.15s; }
.nav-panel a:hover { color: var(--gold); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--blue);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: var(--pad);
  padding-bottom: clamp(28px, 8vh, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The hero logo is fixed and driven by JS: it travels from screen-center
   to the top-left header slot, shrinking as the page scrolls. */
.hero-logo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  transform-origin: top left;
  will-change: transform;
  pointer-events: none;
  transition: color 0.4s var(--ease);
}
.hero-logo.pinned { color: var(--white); pointer-events: auto; }
.hero-wordmark {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: clamp(14px, 3vw, 22px);
  display: block;
  width: clamp(150px, 42vw, 240px);
  height: clamp(42px, 12vw, 66px);
  background-color: currentColor;
  -webkit-mask: url("../assets/wordmark.svg") center / contain no-repeat;
          mask: url("../assets/wordmark.svg") center / contain no-repeat;
  will-change: opacity;
}

.hero-scroll {
  position: relative;
  z-index: 2;
  width: 40px;
  color: rgba(255, 255, 255, 0.9);
  margin-inline: auto;
  animation: nudge 2s var(--ease) infinite;
}
.hero-scroll svg { width: 100%; height: auto; display: block; }
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

.swatch-tag {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.swatch-tag--hero {
  position: absolute;
  left: var(--pad);
  bottom: clamp(28px, 8vh, 80px);
  color: var(--ink);
  opacity: 0.65;
}

/* ============================================================
   Crafting Brands
   ============================================================ */
.crafting {
  position: relative;
  background: var(--white);
  padding-block: clamp(64px, 16vw, 160px);
  overflow: hidden;
}
.display {
  font-weight: 500;
  font-size: clamp(2.2rem, 12.5vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(28px, 6vw, 48px);
  color: var(--ink);
  text-align: center;
}
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: clamp(1rem, 4vw, 1.3rem);
  text-decoration: none;
  padding: 0.7em 1.5em;
  position: relative;
  transition: transform 0.18s var(--ease);
}
/* Offset frame in the button's own colour, matching the PDF's layered look. */
.btn::after {
  content: "";
  position: absolute;
  inset: 8px -8px -8px 8px;
  border: 1.5px solid var(--btn-frame, currentColor);
  z-index: -1;
  opacity: 0.7;
  transition: inset 0.18s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); }
/* Press down: the button drops onto its frame for a tactile click. */
.btn:active {
  transform: translate(6px, 6px);
  transition-duration: 0.07s;
}
.btn:active::after { inset: 2px -2px -2px 2px; }
.btn--gold  { background: var(--gold);  color: var(--cream); --btn-frame: var(--gold); }
.btn--cream { background: var(--cream); color: var(--ink);  --btn-frame: var(--cream); }
.crafting .btn { display: block; width: max-content; margin-inline: auto; }

/* ============================================================
   Work
   ============================================================ */
.work {
  background: var(--gold);
  color: var(--cream);
  padding-block: clamp(56px, 13vw, 130px);
  overflow: hidden;
}
.section-title {
  font-weight: 500;
  font-size: clamp(1.9rem, 10vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(36px, 8vw, 70px);
}
.section-title--cream { color: var(--cream); }

/* "coming soon" placeholders for the Work and Clients sections */
.coming-soon {
  margin: 0;
  text-align: center;
  font-size: clamp(1.3rem, 5.5vw, 2.2rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  padding: clamp(48px, 13vw, 100px) 1rem;
  border: 1.5px dashed currentColor;
  border-radius: 4px;
  opacity: 0.75;
}
.coming-soon--cream { color: var(--cream); }
.coming-soon--gold  { color: var(--gold); max-width: 640px; margin-inline: auto; }

.work-grid {
  display: grid;
  gap: clamp(36px, 7vw, 56px);
  margin-bottom: clamp(40px, 8vw, 64px);
}
.work-card { display: flex; flex-direction: column; }
.work-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--blue);
  margin-bottom: 1.25rem;
}
.work-meta h3 {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 400;
  margin: 0 0 0.25rem;
  color: var(--ink);
}
.work-meta .subtitle {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.work-meta .scope {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.work-meta .scope li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gray);
}
.work .swatch-tag { color: var(--gray); opacity: 0.85; }
.work-meta h3 + .subtitle .swatch-tag { color: var(--gray); }
.work .btn--cream { display: block; width: max-content; margin-inline: auto; }

/* ============================================================
   About
   ============================================================ */
.about {
  position: relative;
  background: var(--white);
  padding-block: clamp(72px, 16vw, 150px);
  overflow: hidden;
}
.intro {
  font-weight: 500;
  font-size: clamp(1.7rem, 9vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--blue);
  margin: 0 0 1.4rem;
}
.intro-sub {
  font-size: clamp(1rem, 4.5vw, 1.6rem);
  line-height: 1.4;
  color: var(--blue);
  margin: 0 0 2rem;
}
.about-panel {
  margin-top: clamp(40px, 9vw, 64px);
  width: clamp(180px, 60%, 360px);
  aspect-ratio: 297 / 348;
  margin-left: auto;
  color: var(--blue);
}

/* ============================================================
   Partners marquee
   ============================================================ */
.partners {
  background: var(--white);
  padding-block: clamp(20px, 5vw, 48px) clamp(56px, 12vw, 110px);
  overflow: hidden;
}
.partners-label {
  color: var(--blue);
  font-weight: 500;
  font-size: clamp(1rem, 4.6vw, 1.5rem);
  margin: 0 0 clamp(24px, 5vw, 44px);
}

/* generic marquee mechanics */
.marquee {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee--footer {
  -webkit-mask-image: none;
          mask-image: none;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee-track--rtl { animation-duration: 28s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.marquee-group .brand {
  height: clamp(34px, 9vw, 54px);
  width: auto;
  margin-inline: clamp(22px, 6vw, 56px);
  opacity: 0.9;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   Clients
   ============================================================ */
.clients {
  position: relative;
  background: var(--white);
  padding-block: clamp(40px, 9vw, 90px) clamp(64px, 14vw, 130px);
  overflow: hidden;
}
.section-title--gold {
  color: var(--gold);
  text-align: center;
  font-size: clamp(1.9rem, 8vw, 3.4rem);
  margin-bottom: clamp(40px, 9vw, 72px);
}
.testimonial {
  margin: 0;
  border: 1.5px solid rgba(46, 6, 7, 0.18);
  padding: clamp(22px, 6vw, 44px);
  max-width: 640px;
  margin-inline: auto;
}
.testimonial-photo {
  width: clamp(120px, 40%, 200px);
  aspect-ratio: 1 / 1;
  background: var(--blue);
  margin-bottom: clamp(28px, 7vw, 48px);
}
.testimonial blockquote {
  font-size: clamp(1.8rem, 8vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(48px, 12vw, 90px);
  color: var(--ink);
}
.testimonial figcaption .t-name {
  font-size: clamp(1.1rem, 5vw, 1.5rem);
  color: var(--ink);
}

/* ============================================================
   CTA + newsletter
   ============================================================ */
.cta {
  background: var(--blue);
  color: var(--white);
  padding-block: clamp(64px, 15vw, 140px);
  overflow: hidden;
}
.cta-title {
  font-weight: 500;
  font-size: clamp(2.4rem, 14.5vw, 8rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(28px, 7vw, 52px);
  color: var(--white);
}
.cta-hello {
  background: var(--cream);
  color: var(--ink);
  margin-bottom: clamp(56px, 13vw, 110px);
}
.newsletter-copy {
  font-size: clamp(1.05rem, 4.8vw, 1.5rem);
  line-height: 1.4;
  max-width: 30ch;
  margin: 0 0 clamp(22px, 5vw, 36px);
}
.newsletter {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 0.5rem 0.5rem 0.5rem 1.4rem;
  max-width: 560px;
  margin-bottom: clamp(48px, 11vw, 90px);
}
.newsletter input {
  flex: 1;
  border: 0;
  background: none;
  color: var(--white);
  font: inherit;
  font-size: clamp(1.1rem, 5vw, 1.6rem);
  letter-spacing: 0.08em;
  padding: 0.4rem 0;
}
.newsletter input::placeholder { color: rgba(255, 255, 255, 0.85); }
.newsletter input:focus { outline: none; }
.newsletter button {
  flex: 0 0 auto;
  width: 52px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--ease);
}
.newsletter button:hover { transform: translateX(4px); }
.newsletter button svg { width: 44px; height: auto; }

.cta-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}
.cta-links a {
  color: var(--white);
  text-decoration: none;
  font-size: clamp(1.4rem, 6vw, 2rem);
  font-weight: 400;
}
.cta-links a:hover { text-decoration: underline; }

/* ============================================================
   Footer marquee
   ============================================================ */
.footer {
  background: var(--white);
  padding-block: clamp(36px, 9vw, 90px);
  overflow: hidden;
}
.footer-group { align-items: center; }
.footer-item {
  font-size: clamp(5rem, 24vw, 16rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gold);
  padding-inline: clamp(28px, 7vw, 80px);
  white-space: nowrap;
}

/* ============================================================
   Decorative parallax shapes
   ============================================================ */
.shape {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}
.shape--circle { border-radius: 50%; }
.shape--gold   { background: var(--gold); }
.shape--orange { background: var(--orange); }
.shape--pink   { background: var(--pink); }

/* crafting */
.shape-a { width: clamp(110px, 36vw, 220px); height: clamp(110px, 36vw, 220px); top: -40px; left: -40px; }
.shape-b { width: clamp(70px, 22vw, 150px);  height: clamp(70px, 22vw, 150px);  bottom: -30px; right: -30px; }
/* about */
.shape-c { width: clamp(80px, 24vw, 150px);  height: clamp(80px, 24vw, 150px);  top: 4%;  left: -50px; }
.shape-d { width: clamp(120px, 38vw, 240px); height: clamp(120px, 38vw, 240px); top: 30%; right: -70px; }
.shape-e { width: clamp(150px, 46vw, 280px); height: clamp(150px, 46vw, 280px); bottom: -10%; left: -10%; }
/* clients */
.shape-f { width: clamp(120px, 38vw, 220px); height: clamp(120px, 38vw, 220px); top: 6%;  right: -60px; }
.shape-g { width: clamp(80px, 24vw, 150px);  height: clamp(80px, 24vw, 150px);  bottom: 8%; left: -40px; }

/* ============================================================
   Desktop
   ============================================================ */
@media (min-width: 768px) {
  :root { --header-h: 76px; }

  .display { font-size: clamp(5rem, 11vw, 8rem); }

  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-thumb { aspect-ratio: 4 / 5; }

  .about .container { display: grid; grid-template-columns: 1.2fr 0.8fr; align-items: end; column-gap: 4vw; }
  .about-panel { margin-top: 0; align-self: center; }
  .about .btn--gold { grid-column: 1; }

  .cta .container { display: grid; grid-template-columns: 1.1fr 0.9fr; column-gap: 5vw; align-items: start; }
  .cta-title { grid-column: 1; grid-row: 1 / span 2; }
  .cta-hello { grid-column: 1; align-self: start; }
  .newsletter-copy { grid-column: 2; grid-row: 1; }
  .newsletter { grid-column: 2; grid-row: 2; align-self: start; }
  .cta-links { grid-column: 2; grid-row: 3; }
}

@media (min-width: 1024px) {
  .display { font-size: 8rem; }
  .section-title { font-size: 5.4rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; transform: none; }
  .hero-scroll { animation: none; }
  .shape { transform: none !important; }
}
