/* FIOR landing page. Colours, type and spacing come from ../tokens.css.
   Layout: one pinned label that opens into the page, then one pinned bottle that changes through nine scents. */

:root {
  /* The product photos sit on a soft blush backdrop; the collection stage matches it. */
  --blush: #E9DCD7;
  --night: #0D0D0E;
  --night-ink: #F2E9D8;
  --night-muted: #B3A595;
  --night-gold: #C9A35C;
  --night-hairline: #3A332B;
  --gutter: max(24px, env(safe-area-inset-left, 0px));
  --gutter-r: max(24px, env(safe-area-inset-right, 0px));
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface-100);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

:focus-visible { outline: 1px solid var(--gold-text); outline-offset: 4px; }

.caps {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* The wordmark is always the logo file, painted through a mask so it can sit in ink or cream. */
.wordmark {
  display: block;
  aspect-ratio: 576 / 246;
  background: currentColor;
  -webkit-mask: url("../assets/Logos/fior-wordmark.png") center / contain no-repeat;
          mask: url("../assets/Logos/fior-wordmark.png") center / contain no-repeat;
}

/* The label's divider: rule, dot, rule. */
.divider {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--gold);
}
.divider::before, .divider::after { content: ""; width: 56px; height: 1px; background: currentColor; }
.divider i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: var(--gutter); padding-right: var(--gutter-r);
  display: flex; align-items: center; justify-content: space-between;
  color: var(--ink);
  transition: color 0.5s var(--ease);
}
.site-header.on-night { color: var(--night-ink); }
.site-header .brand {
  width: 76px; text-decoration: none; color: inherit;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.site-header.show-brand .brand { opacity: 1; transform: none; }
.site-header.on-night .brand { opacity: 0; }
.site-nav { display: flex; gap: 32px; }
.site-nav a { text-decoration: none; position: relative; padding-block: 6px; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0.22em; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); }
.site-nav { align-items: center; }
.site-nav .nav-ig { display: grid; place-items: center; width: 32px; height: 32px; margin-right: -6px; padding: 0; transition: opacity 0.4s var(--ease); }
.site-nav .nav-ig::after { display: none; }
.site-nav .nav-ig svg { width: 20px; height: 20px; }
.site-nav .nav-ig:hover { opacity: 0.6; }

/* ---------- Opening: the label opens into the page ---------- */

.opening { position: relative; height: 320vh; }
.opening-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; place-items: center; overflow: hidden;
}

/* --open runs 0 to 1 as the label's frame grows to the edges of the screen. */
.label-frame {
  --open: 0;
  --w0: min(360px, 78vw);
  --h0: min(440px, 62svh);
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--w0) + (100vw - 32px - var(--w0)) * var(--open));
  height: calc(var(--h0) + (100svh - 32px - var(--h0)) * var(--open));
  transform: translate(-50%, -50%);
  border: 1px solid var(--gold);
  pointer-events: none;
}
.label-frame::after {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid var(--gold); opacity: calc(0.55 * (1 - var(--open)));
}

.label-face {
  position: relative; display: grid; justify-items: center; gap: 28px;
  text-align: center; will-change: transform, opacity;
}
.label-face .wordmark { width: min(232px, 46vw); }
.label-face .rule { width: 120px; height: 1px; background: var(--gold); }
.label-face h1 { font-weight: 500; letter-spacing: 0.34em; margin-right: -0.34em; }

.scroll-cue {
  position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: grid; justify-items: center; gap: 12px;
  color: var(--ink-muted); text-decoration: none;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 44px; background: var(--ink-muted);
  transform-origin: top; animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); }
  55% { transform: scaleY(1); transform-origin: top; }
  56% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.manifesto {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 96px max(40px, 8vw);
  pointer-events: none;
}
.js .manifesto { opacity: var(--show, 0); }
.manifesto p {
  max-width: 17em;
  font-size: clamp(30px, 5.2vw, 76px);
  line-height: 1.12;
  font-weight: 300;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
}
.manifesto em { font-style: italic; font-weight: 400; }
.manifesto .w { opacity: var(--o, 1); transition: opacity 0.25s linear; }

/* Without script the manifesto simply follows the label. */
html:not(.js) .opening { height: auto; }
html:not(.js) .opening-pin { position: static; height: auto; display: block; }
html:not(.js) .label-frame, html:not(.js) .scroll-cue { display: none; }
html:not(.js) .label-face { padding-block: 160px 80px; }
html:not(.js) .manifesto { position: static; padding-block: 80px 160px; }

/* ---------- Collection: one bottle, nine scents ---------- */

.collection { position: relative; background: var(--blush); }
.collection-intro {
  display: grid; justify-items: center; gap: 24px; text-align: center;
  padding: 160px var(--gutter-r) 40px var(--gutter);
}
.collection-intro .caps { color: var(--gold-text); }
.collection-intro h2 {
  font-size: clamp(40px, 6vw, 96px); line-height: 1; font-weight: 300; letter-spacing: -0.015em;
  text-wrap: balance;
}
.collection-intro h2 em { font-weight: 400; }
.collection-intro p { max-width: 34em; color: var(--ink-muted); }

.js .scents { height: calc(9 * 88vh + 100vh); }
.js .stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "copy bottle notes";
  align-items: center; column-gap: clamp(24px, 4vw, 72px);
  padding: calc(var(--header-h) + 16px) var(--gutter-r) 56px var(--gutter);
}

.bottle {
  grid-area: bottle; position: relative;
  width: min(66svh, 40vw); aspect-ratio: 1;
  /* Feather the photo's edges so the backdrop runs into the stage. */
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask: radial-gradient(closest-side, #000 72%, transparent 100%);
  will-change: transform;
}
.bottle img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.9s var(--ease);
}
.bottle img.is-active { opacity: 1; }

.js .scent { display: contents; }
.js .scent-copy, .js .scent-notes {
  grid-row: 1; opacity: 0; visibility: hidden; transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease), visibility 0s 0.6s;
}
.js .scent-copy { grid-area: copy; justify-self: end; max-width: 400px; }
.js .scent-notes { grid-area: notes; justify-self: start; width: min(100%, 320px); }
.js .scent.is-active .scent-copy, .js .scent.is-active .scent-notes {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.8s var(--ease) 0.2s, transform 0.9s var(--ease) 0.2s, visibility 0s;
}
.js .scent.is-active .scent-notes { transition-delay: 0.32s, 0.32s, 0s; }
.js .scent.is-past .scent-copy, .js .scent.is-past .scent-notes { transform: translateY(-18px); }
.js .scent-photo { display: none; }

.scent-copy { display: grid; gap: 16px; }
.scent-family { color: var(--gold-text); }
.scent-name {
  font-size: clamp(40px, 4.6vw, 76px); line-height: 1; font-weight: 300; letter-spacing: -0.01em;
}
.scent-desc { color: var(--ink-muted); }

.scent-notes { display: grid; border-top: 1px solid var(--hairline); }
.scent-notes div { display: grid; gap: 4px; padding-block: 16px; border-bottom: 1px solid var(--hairline); }
.scent-notes dt { color: var(--ink-muted); }
.scent-notes dd { font-size: 22px; line-height: 28px; font-style: italic; }

.stage-foot {
  position: absolute; left: var(--gutter); right: var(--gutter-r);
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 20px;
  color: var(--ink-muted); font-variant-numeric: tabular-nums;
}
.stage-count b { color: var(--ink); font-weight: 500; }
.stage-ticks { display: flex; flex: 1; gap: 6px; }
.stage-ticks button {
  flex: 1; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; position: relative;
}
.stage-ticks button::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: var(--ink); opacity: 0.18; transition: opacity 0.5s var(--ease);
}
.stage-ticks button.is-active::before, .stage-ticks button:hover::before { opacity: 1; }
html:not(.js) .stage-foot, html:not(.js) .bottle { display: none; }

/* Without script, each scent is a plain row. */
html:not(.js) .scent {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; align-items: center;
  max-width: 1200px; margin-inline: auto; padding: 64px var(--gutter-r) 64px var(--gutter);
}

@media (max-width: 860px) {
  .js .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "bottle" "copy" "notes";
    align-content: center; justify-items: center; row-gap: 12px;
    padding-bottom: 60px;
  }
  .bottle { width: min(38svh, 78vw); }
  .js .scent-copy { justify-self: center; text-align: center; max-width: 30em; gap: 6px; align-self: start; }
  .js .scent-notes { justify-self: center; width: 100%; max-width: 30em; align-self: start; }
  .scent-name { font-size: clamp(34px, 9vw, 48px); }
  .scent-desc { font-size: 16px; line-height: 23px; }
  .scent-notes div { grid-template-columns: 64px minmax(0, 1fr); align-items: baseline; gap: 12px; padding-block: 7px; }
  .scent-notes dd { font-size: 17px; line-height: 22px; }
  .site-nav { gap: 20px; }
}
@media (max-width: 860px) and (max-height: 720px) {
  .scent-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .bottle { width: min(32svh, 70vw); }
}

/* ---------- All nine, side by side ---------- */

.text-link {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink);
  background: none; border: 0; border-bottom: 1px solid var(--gold); border-radius: 0;
  padding: 6px 0; cursor: pointer; transition: border-color 0.4s var(--ease);
}
.text-link:hover, .text-link:focus-visible { border-color: var(--ink); }
/* A quiet cue on the "see all nine" links: a gold dot that breathes and a glint that crosses the underline. */
.glint { position: relative; display: inline-flex; align-items: center; gap: 10px; border-bottom-color: transparent; }
.glint::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); flex: none;
  animation: glint-dot 3.6s ease-in-out infinite;
}
.glint::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--gold) 0 42%, var(--ink) 50%, var(--gold) 58% 100%);
  background-size: 300% 100%; background-position: 100% 0;
  animation: glint-line 5.4s var(--ease) infinite;
}
.glint:hover::after, .glint:focus-visible::after { background: var(--ink); animation: none; }
@keyframes glint-dot { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes glint-line { 0%, 60% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.collection-intro .text-link { margin-top: 8px; }
.stage-foot .text-link { white-space: nowrap; }

.all {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 12px; border: 0; background: var(--blush); color: var(--ink);
  overflow: hidden;
}
.all::backdrop { background: var(--blush); }
.all[open] { animation: all-in 0.7s var(--ease); }
@keyframes all-in { from { opacity: 0; transform: translateY(16px); } }
.all-inner {
  height: 100%; overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--gold);
  padding: 0 clamp(16px, 4vw, 56px) 56px;
}
.all-head {
  position: sticky; top: 0; z-index: 1; background: var(--blush);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding-block: clamp(20px, 4vh, 40px) 20px; border-bottom: 1px solid var(--hairline);
}
.all-head > div { display: grid; gap: 8px; }
.all-head .caps { color: var(--gold-text); }
.all-head h2 { font-size: clamp(30px, 4vw, 56px); line-height: 1; font-weight: 300; letter-spacing: -0.01em; }
.all-head h2 em { font-weight: 400; }

.all-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.all-grid li { border-bottom: 1px solid var(--hairline); }
.all-grid li:not(:nth-child(3n + 1)) { border-left: 1px solid var(--hairline); }
.all-card {
  display: grid; grid-template-rows: auto auto 1fr; gap: 14px; width: 100%; height: 100%;
  padding: 8px clamp(16px, 2vw, 28px) 28px; text-align: center; text-decoration: none; color: inherit;
}
.all-card img {
  width: min(100%, 300px); height: auto; aspect-ratio: 1; justify-self: center;
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask: radial-gradient(closest-side, #000 72%, transparent 100%);
  transition: transform 1.1s var(--ease);
}
.all-card:hover img, .all-card:focus-visible img { transform: scale(1.05); }
.all-card .name-block { display: grid; gap: 6px; margin-top: -8px; }
.all-card .family { color: var(--gold-text); }
.all-card .name { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.05; font-weight: 300; }
.all-card dl { display: grid; align-content: start; text-align: left; border-top: 1px solid var(--hairline); }
.all-card dl div {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: baseline;
  padding-block: 7px; border-bottom: 1px solid var(--hairline);
}
.all-card dl div:last-child { border-bottom: 0; }
.all-card dt { color: var(--ink-muted); font-size: 11px; }
.all-card dd { font-size: 17px; line-height: 22px; font-style: italic; }

@media (max-width: 980px) {
  .all-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .all-grid li:not(:nth-child(3n + 1)) { border-left: 0; }
  .all-grid li:nth-child(even) { border-left: 1px solid var(--hairline); }
}
@media (max-width: 620px) {
  .all { padding: 8px; }
  .all-grid { grid-template-columns: minmax(0, 1fr); }
  .all-grid li:nth-child(even) { border-left: 0; }
  .all-card {
    grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto auto;
    column-gap: 14px; row-gap: 10px; padding: 16px 0; text-align: left; align-items: center;
  }
  .all-card img { width: 112px; grid-row: 1 / span 2; align-self: start; }
  .all-card .name-block { margin-top: 0; }
  .all-card dl div { grid-template-columns: 48px minmax(0, 1fr); padding-block: 5px; }
  .all-card dd { font-size: 16px; line-height: 20px; }
  .stage-foot { gap: 12px; }
}

/* ---------- Notes ribbon ---------- */

.ribbon {
  overflow: hidden; padding-block: 120px; display: grid; gap: 8px;
  border-bottom: 1px solid var(--hairline);
}
.ribbon-row {
  display: flex; gap: 0.6em; white-space: nowrap; width: max-content;
  font-size: clamp(44px, 8vw, 128px); line-height: 1.1; font-weight: 300; letter-spacing: -0.015em;
  will-change: transform;
}
.ribbon-row:nth-child(2) { font-style: italic; color: var(--ink-muted); }
.ribbon-row span::after { content: "·"; margin-left: 0.6em; color: var(--gold); font-style: normal; }

/* ---------- Sizes ---------- */

.band { padding: 160px var(--gutter-r) 160px var(--gutter); }
.band-inner { max-width: 1200px; margin-inline: auto; display: grid; gap: 72px; }
.band-head { display: grid; gap: 20px; max-width: 34em; }
.band-head .caps { color: var(--gold-text); }
.band-head h2 {
  font-size: clamp(36px, 4.6vw, 64px); line-height: 1.05; font-weight: 300; letter-spacing: -0.01em;
  text-wrap: balance;
}
.band-head p { color: var(--ink-muted); }

.sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hairline); }
.sizes li {
  display: grid; gap: 8px; padding: 40px 24px 40px 0;
  border-bottom: 1px solid var(--hairline);
}
.sizes li + li { padding-left: 32px; border-left: 1px solid var(--hairline); }
.sizes .num {
  font-size: clamp(72px, 13vw, 200px); line-height: 0.9; font-weight: 300; letter-spacing: -0.03em;
  font-variant-numeric: lining-nums;
}
.sizes .unit { color: var(--ink-muted); }
@media (max-width: 640px) {
  .sizes { grid-template-columns: 1fr; }
  .sizes li { grid-template-columns: auto 1fr; align-items: baseline; gap: 16px; padding: 24px 0; }
  .sizes li + li { padding-left: 0; border-left: 0; }
  .band { padding-block: 112px; }
  .ribbon { padding-block: 80px; }
}

/* ---------- Ritual ---------- */

.ritual { background: var(--surface-200); border-block: 1px solid var(--hairline); }
.ritual-lines { display: grid; gap: 8px; }
.ritual-lines li {
  display: grid; grid-template-columns: 3.2em minmax(0, 1fr); align-items: baseline; gap: 16px;
  padding-block: 28px; border-bottom: 1px solid var(--hairline);
  font-size: clamp(26px, 3.6vw, 52px); line-height: 1.12; font-weight: 300;
}
.ritual-lines .step { color: var(--gold-text); }

/* Scroll reveals start from a visible state and only add a short rise. */
.js .rise { opacity: 0.001; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.js .rise.is-in { opacity: 1; transform: none; }
.js .rise[data-delay="1"] { transition-delay: 0.12s; }
.js .rise[data-delay="2"] { transition-delay: 0.24s; }

/* ---------- Closing ---------- */

.closing {
  background: var(--night); color: var(--night-ink);
  padding: 200px var(--gutter-r) 48px var(--gutter);
  display: grid; justify-items: center; gap: 120px; text-align: center;
}
.closing-mark { display: grid; justify-items: center; gap: 32px; }
.closing .wordmark { width: min(300px, 62vw); }
.closing .divider { color: var(--night-gold); }
.closing p.lede {
  font-size: clamp(28px, 3.6vw, 48px); line-height: 1.15; font-weight: 300; max-width: 18em; text-wrap: balance;
}
.button {
  display: inline-block; padding: 16px 36px; border: 1px solid var(--night-gold);
  color: var(--night-ink); text-decoration: none;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
.button:hover, .button:focus-visible { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }
.contact {
  width: min(100%, 880px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--night-hairline); border-bottom: 1px solid var(--night-hairline);
}
.contact li { display: grid; gap: 10px; justify-items: center; padding: 28px 12px; min-width: 0; }
.contact li + li { border-left: 1px solid var(--night-hairline); }
.contact .caps { color: var(--night-gold); }
.contact a {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  font-size: 22px; line-height: 28px; font-weight: 300; text-decoration: none; overflow-wrap: anywhere;
  font-variant-numeric: lining-nums;
  border-bottom: 1px solid transparent; transition: border-color 0.4s var(--ease);
}
.contact a:hover, .contact a:focus-visible { border-color: var(--night-gold); }
.contact svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; }
  .contact li { padding: 20px 0; }
  .contact li + li { border-left: 0; border-top: 1px solid var(--night-hairline); }
  .site-nav { gap: 12px; font-size: 11px; letter-spacing: 0.16em; }
  .site-header .brand { width: 60px; }
  .closing { gap: 72px; padding-top: 140px; }
}
.closing-foot {
  width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 24px; border-top: 1px solid var(--night-hairline); color: var(--night-muted);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue::after { animation: none; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  .all[open] { animation: none; }
  .glint::before, .glint::after { animation: none; }
  .all-card img { transition: none; }
  .bottle img, .js .scent-copy, .js .scent-notes, .manifesto .w { transition-duration: 0.01s !important; transition-delay: 0s !important; }
  .js .scent-copy, .js .scent-notes { transform: none !important; }
}
