:root {
  --bg: #214953;        /* sampled from the Cera Atelier logo */
  --surface: #2b5660;
  --ink: #e8e6e1;       /* a stone close to the logo lettering */
  --soft: #2c4a4f;      /* secondary text on the light footer */
  --margin: clamp(16px, 2.2vw, 32px);
  /* the five sizes: small, body, lead, head, and the wordmark */
  --small: 14px;
  --body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  --head: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Work Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--body)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bg); }

.head { font: 300 var(--head)/1 var(--sans); letter-spacing: -0.035em; }
.lead { font: 300 var(--lead)/1.35 var(--sans); }
.muted { opacity: .8; }

.btn {
  display: inline-block; padding: 16px 28px; background: var(--ink); color: var(--bg);
  text-decoration: none; font-weight: 500;
  transition: background .25s, transform .25s var(--ease);
}
.btn:hover { background: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-block { display: block; text-align: center; }
.link { text-underline-offset: 6px; text-decoration-thickness: 1px; transition: text-underline-offset .25s; }
.link:hover { text-underline-offset: 10px; }

html { scrollbar-color: var(--surface) var(--bg); }
.page { position: relative; }
/* the landing fabric stays fixed behind the first two screens; later sections carry their own ground */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: rgb(33 73 83 / .62); }
.fabrics ~ section { background: var(--bg); }

/* Hero: the logo on one of the account's fabrics */
.hero { position: relative; height: 100svh; min-height: 640px; display: grid; place-items: center; overflow: hidden; }
.nav { position: absolute; z-index: 2; top: 32px; right: var(--margin); display: flex; gap: 28px; align-items: center; font-size: var(--small); }
.nav a { text-decoration: none; transition: opacity .2s; }
.nav a:hover { opacity: .7; }
.nav-insta { padding: 10px 18px; background: var(--bg); }
.hero-center { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; padding: 0 20px; }
.hero-logo svg { display: block; width: clamp(220px, 24vw, 340px); height: auto; }
.hero-center .lead { max-width: 26ch; margin-top: 36px; }
.hero-actions { display: flex; gap: 28px; align-items: center; margin-top: 32px; }

/* Intro: statement between fabrics, which drift at their own rates */
.intro {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: start;
  padding: 200px var(--margin) 120px;
}
.intro-pin { display: contents; }
.intro-text { grid-column: 5 / 9; grid-row: 1; align-self: center; text-align: center; display: grid; gap: 28px; }
.pass { width: 100%; object-fit: cover; }
.pass-1 { grid-column: 1 / 5; grid-row: 1 / 3; aspect-ratio: 4/5; }
.pass-2 { grid-column: 9 / 13; grid-row: 1 / 3; aspect-ratio: 4/5; margin-top: 30svh; }
.pass-3 { grid-column: 6 / 8; grid-row: 2; aspect-ratio: 1; margin-top: 64px; }

/* Fabrics: full screen, the photo at full height over a blurred copy of itself */
.fabrics {
  position: relative; height: 100svh; min-height: 640px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 40px;
  padding: 0 var(--margin); background: var(--fab, var(--bg)); transition: background-color .8s var(--ease);
}
.fabric-bg { position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); object-fit: cover; filter: blur(30px) brightness(.5); }
.fabric-tabs, .fabric-photo, .fabric-card { position: relative; }
.fabric-tabs { display: grid; gap: 6px; justify-self: start; }
.fabric-tabs button {
  font: 300 var(--lead)/1.25 var(--sans); color: var(--ink); opacity: .62; background: none; border: 0;
  padding: 6px 0; text-align: left; cursor: pointer; transition: opacity .25s, transform .3s var(--ease);
}
.fabric-tabs button:hover { opacity: 1; transform: translateX(6px); }
.fabric-tabs button[aria-selected="true"] { opacity: 1; font-weight: 400; }
.fabric-photo { height: 100svh; aspect-ratio: 664 / 1092; }
.fabric-photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s, transform 1.2s var(--ease); }
.fabric-photo img.swap { opacity: 0; transform: scale(1.03); }
.photo-nav { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; display: flex; gap: 8px; }
.photo-nav[hidden] { display: none; }
.fabric-card { justify-self: end; width: min(100%, 360px); background: rgb(0 0 0 / .38); padding: 32px; display: grid; gap: 10px; }
.fabric-card .head { font: 400 var(--lead)/1.2 var(--sans); letter-spacing: -0.01em; }
.count { font-weight: 500; margin-top: 8px; }
.designs { display: grid; gap: 6px; margin-bottom: 14px; }
.designs[hidden] { display: none; }
.designs button {
  display: flex; align-items: center; gap: 12px; padding: 4px; border: 0; background: none; color: var(--ink);
  font: inherit; font-size: var(--small); text-align: left; cursor: pointer; opacity: .6; transition: opacity .25s, background .25s;
}
.designs button img { width: 44px; height: 44px; object-fit: cover; }
.designs button:hover { opacity: .9; }
.designs button[aria-pressed="true"] { opacity: 1; background: rgb(255 255 255 / .12); }
.sq {
  width: 48px; height: 48px; border: 0; background: var(--ink); color: var(--bg);
  font-size: 20px; cursor: pointer; transition: background .2s, transform .2s var(--ease);
}
.sq:hover { background: #fff; }
.sq:active { transform: scale(.94); }
.noscript { grid-column: 1 / -1; }

/* Gallery: the one rest */
.gallery { position: relative; overflow: hidden; height: 100svh; min-height: 760px; max-width: 1440px; margin: 0 auto; }
.g { position: absolute; width: clamp(140px, 13vw, 210px); aspect-ratio: 9/10; object-fit: cover; }
.g1 { left: 20%; top: 8%; }
.g2 { left: 45%; top: 3%; }
.g3 { left: 68%; top: 12%; }
.g4 { left: 14%; top: 50%; }
.g5 { left: 74%; top: 54%; }
.g6 { left: 30%; top: 72%; }
.g7 { left: 58%; top: 75%; }
.gallery-text {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(32vw, 460px); text-align: center; display: grid; gap: 18px; justify-items: center;
}

/* How to order: a bordered timeline read top to bottom */
.order { padding: 160px var(--margin); }
.order .head { text-align: center; margin-bottom: 80px; }
.timeline { --line: 1; position: relative; max-width: 1080px; margin: 0 auto; display: grid; gap: 40px; }
.timeline::before, .timeline::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; translate: -50% 0; background: rgb(232 230 225 / .22); }
.timeline::after { background: var(--ink); transform: scaleY(var(--line)); transform-origin: top; }
.step { position: relative; width: calc(50% - 44px); }
.step:nth-child(odd) { justify-self: start; }
.step:nth-child(even) { justify-self: end; }
.step::before {
  content: ""; position: absolute; z-index: 1; top: 50%; width: 15px; height: 15px; translate: 0 -50%;
  border-radius: 50%; background: var(--ink); border: 5px solid var(--bg); box-sizing: content-box;
}
.step:nth-child(odd)::before { right: -56.5px; }
.step:nth-child(even)::before { left: -56.5px; }
.step-box {
  display: grid; grid-template-columns: 112px 1fr; gap: 24px; align-items: center; padding: 20px;
  border: 1px solid rgb(232 230 225 / .35); transition: border-color .3s, background-color .3s;
}
.step-box:hover { border-color: var(--ink); background: rgb(255 255 255 / .04); }
.step-box img { width: 112px; height: 140px; object-fit: cover; }
.step h3 { font: 500 var(--lead)/1.2 var(--sans); letter-spacing: -0.01em; }
.step p { margin-top: 8px; }

/* The reply card */
.cta {
  position: relative; overflow: hidden; min-height: 64svh;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 48px var(--margin) 0;
}
.cta-note { grid-column: 1 / 5; align-self: end; margin-bottom: 64px; }
.card {
  grid-column: 6 / 13; align-self: end; margin-bottom: -60px; aspect-ratio: 7/5;
  background: var(--ink); color: var(--bg); padding: 48px;
  display: grid; align-content: center; justify-items: center; gap: 14px; text-align: center;
}
.card h2 { font: 400 var(--head)/1.05 var(--sans); letter-spacing: -0.03em; }
.bar-btn {
  display: grid; place-items: center; width: 100%; height: 56px; margin-top: 18px;
  background: var(--bg); color: var(--ink); text-decoration: none; font-weight: 500;
  transition: background .25s, transform .25s var(--ease);
}
.bar-btn:hover { background: var(--surface); transform: translateY(-2px); }

/* Footer */
.wordmark { font-family: var(--serif); font-weight: 300; line-height: .8; letter-spacing: -0.04em; white-space: nowrap; }
.foot {
  display: grid; grid-template-rows: auto 200px auto auto;
  background: var(--ink); color: var(--bg); padding: 40px var(--margin) 20px;
}
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.foot-cols li:first-child { font-weight: 500; }
.foot-cols li + li { color: var(--soft); }
.foot-cols a { text-decoration: none; }
.foot-cols a:hover { text-decoration: underline; }
.foot-logo { display: block; width: 96px; height: 96px; margin-bottom: 8px; }
.foot-mark {
  grid-row: 3; font-size: calc((100vw - 2 * var(--margin)) / 3.85);
  transform: scale(var(--f, 1)); transform-origin: center bottom;
}
.legal { grid-row: 4; font-size: var(--small); margin-top: 24px; }

@media (max-width: 1100px) {
  /* portrait screens: the photo itself fills the screen, controls sit over it */
  .fabrics { display: block; padding: 0; }
  .fabric-bg { display: none; }
  .fabric-photo { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
  .fabric-tabs { position: absolute; z-index: 1; top: 0; left: 0; right: 0; width: 100%; display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; padding: 14px 20px; background: rgb(0 0 0 / .45); }
  .fabric-tabs button { white-space: nowrap; font-size: 18px; }
  .fabric-tabs button:hover { transform: none; }
  .fabric-card { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 12px; width: auto; padding: 20px; gap: 6px; background: rgb(0 0 0 / .55); }
  .designs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .designs button { flex: 0 0 auto; padding: 0; }
  .designs button span { display: none; }
  .designs button img { width: 52px; height: 52px; }
  .photo-nav { top: 50%; bottom: auto; left: 12px; right: 12px; translate: 0 -50%; justify-content: space-between; }
  .timeline::before, .timeline::after { left: 7px; translate: 0 0; }
  .step, .step:nth-child(even) { width: auto; justify-self: stretch; padding-left: 40px; }
  .step:nth-child(odd)::before, .step:nth-child(even)::before { left: 0; right: auto; }
}

/* Phone */
@media (max-width: 767px) {
  .nav { top: 18px; right: 16px; left: 16px; justify-content: space-between; gap: 12px; }
  .nav a:nth-child(2), .nav a:nth-child(3) { display: none; }
  .hero-actions { flex-wrap: wrap; justify-content: center; gap: 20px; }

  .intro { display: grid; grid-template-columns: 1fr; gap: 40px; padding: 120px 20px; }
  .intro-text, .pass { grid-column: 1; grid-row: auto; }
  .intro-text { text-align: left; }
  .pass-1 { width: 64%; }
  .pass-2 { width: 78%; justify-self: end; margin-top: 0; }
  .pass-3 { width: 52%; margin-top: 0; }

  .gallery { height: auto; min-height: 0; padding: 80px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .g { position: static; width: 100%; }
  .g:nth-of-type(even) { margin-top: 48px; }
  .gallery-text { position: static; transform: none; width: auto; grid-column: 1 / -1; grid-row: 3; padding: 40px 0; }

  .order { padding: 120px 0; }
  .order .head { margin: 0 20px 24px; }
  .order { padding: 120px 20px; }
  .order .head { margin-bottom: 48px; }
  .timeline { gap: 24px; }
  .step-box { grid-template-columns: 84px 1fr; gap: 16px; padding: 16px; }
  .step-box img { width: 84px; height: 105px; }
  .step h3 { font-size: 19px; }
  .step p { font-size: 16px; }

  .cta { display: flex; flex-direction: column; gap: 40px; padding: 100px 20px 0; min-height: 0; }
  .cta-note { margin: 0; }
  .card { width: 90%; align-self: center; aspect-ratio: auto; padding: 36px 24px 72px; }
  .bar-btn { height: 52px; }

  .foot-cols { grid-template-columns: 1fr 1fr; row-gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
