/* ============================================================
   PETAL35 — Artificial Floral Atelier
   Aesthetic: luxury editorial. Warm ivory, quiet charcoal,
   dusty-rose accent. Cormorant Garamond + Jost.
   ============================================================ */

:root {
  /* Palette (tweakable via --* overrides from tweaks.js) */
  --bg:        oklch(0.969 0.009 73);
  --bg-2:      oklch(0.946 0.013 68);
  --ink:       oklch(0.265 0.014 55);
  --ink-soft:  oklch(0.46 0.014 52);
  --ink-faint: oklch(0.62 0.012 52);
  --line:      oklch(0.27 0.014 55 / 0.16);
  --line-soft: oklch(0.27 0.014 55 / 0.08);
  --accent:    oklch(0.66 0.092 19);
  --accent-deep: oklch(0.52 0.094 21);
  --paper:     oklch(0.99 0.006 80);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --maxw: 1280px;
  --gutter: clamp(22px, 5vw, 76px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Hide everything until Angular & fonts are ready to avoid flash */
[ng-cloak] { display: none !important; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: 0.005em; }

a { color: inherit; text-decoration: none; }

::selection { background: oklch(0.66 0.092 19 / 0.22); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

/* ============================================================
   The 3D petal canvas — fixed behind everything
   ============================================================ */
#petal-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none; /* clicks pass through; JS reads window mouse */
  display: block;
}

/* All real content sits above the canvas */
.site { position: relative; z-index: 2; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  transition: background 0.5s ease, padding 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: oklch(0.969 0.009 73 / 0.82);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
}
.brand .tilde { color: var(--accent-deep); }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
}
.nav-link {
  font-size: 12.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color 0.35s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.2,0.7,0.2,1);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-links .btn { margin-left: 6px; }

@media (max-width: 720px) {
  .nav-link:not(.btn) { display: none; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 13px 26px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.45s cubic-bezier(0.2,0.7,0.2,1), color 0.45s ease, border-color 0.45s ease, transform 0.45s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn--accent { border-color: var(--accent-deep); color: var(--accent-deep); }
.btn--accent:hover { background: var(--accent-deep); color: var(--paper); }
.btn .arrow { transition: transform 0.45s ease; }
.btn:hover .arrow { transform: translateX(5px); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 90px;
}
.hero__inner { max-width: 940px; }
.hero .eyebrow { margin-bottom: 28px; }
.hero h1 {
  font-size: clamp(54px, 11vw, 152px);
  line-height: 0.94;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.hero h1 .em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent-deep);
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; }
.hero__lede {
  max-width: 520px;
  margin: 38px 0 40px;
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--ink-soft);
  line-height: 1.7;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.hero__meta {
  position: absolute;
  bottom: 42px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.hero__meta .scroll-cue {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-faint);
}
.scroll-cue .rule {
  width: 64px; height: 1px; background: var(--ink-faint); position: relative; overflow: hidden;
}
.scroll-cue .rule::after {
  content:""; position:absolute; inset:0; width:30%; background: var(--accent-deep);
  animation: slide 2.6s cubic-bezier(0.6,0,0.2,1) infinite;
}
@keyframes slide { 0%{transform:translateX(-120%)} 60%,100%{transform:translateX(360%)} }
.hero__meta .figure {
  text-align: right;
  font-family: var(--serif);
}
.hero__meta .figure .num { font-size: 30px; line-height: 1; color: var(--ink); }
.hero__meta .figure .cap { font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); margin-top: 7px; }

@media (max-width: 720px) {
  .hero__meta .figure { display: none; }
}

/* ============================================================
   Marquee strip (value props)
   ============================================================ */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: oklch(0.99 0.006 80 / 0.5);
  overflow: hidden;
}
.strip__track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.strip:hover .strip__track { animation-play-state: paused; }
.strip__item {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 22px 38px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-soft);
}
.strip__item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-deep); flex: none; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   Section scaffold
   ============================================================ */
.section { position: relative; padding: clamp(80px, 12vh, 150px) 0; }
.section--paper { background: oklch(0.99 0.006 80 / 0.66); }
.section__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 64px;
}
.section__head .eyebrow { margin-bottom: 20px; }
.section__head h2 {
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.0;
  letter-spacing: -0.01em;
}
.section__head h2 .em { font-style: italic; color: var(--accent-deep); }
.section__head .intro { color: var(--ink-soft); max-width: 420px; align-self: end; }
@media (max-width: 820px) {
  .section__head { grid-template-columns: 1fr; gap: 22px; margin-bottom: 44px; }
}

/* ============================================================
   Collection grid
   ============================================================ */
.collection {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
@media (max-width: 980px) { .collection { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .collection { grid-template-columns: 1fr; } }

.card { position: relative; cursor: pointer; background: var(--paper); }
.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-2);
}
.card__media .ph {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.02);
  transition: transform 1.1s cubic-bezier(0.16,0.84,0.28,1);
}
.card:hover .card__media .ph { transform: scale(1.08); }
.card__media .ph::after {
  /* striped placeholder texture + label */
  content: attr(data-label);
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; padding: 16px;
  font-family: "Courier New", monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: oklch(0.3 0.02 50 / 0.5);
  background-image: repeating-linear-gradient(
    -45deg,
    oklch(0.3 0.02 50 / 0.05) 0px,
    oklch(0.3 0.02 50 / 0.05) 1px,
    transparent 1px,
    transparent 9px
  );
}
.card__tag {
  position: absolute; top: 16px; left: 16px;
  z-index: 2;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink); background: var(--paper);
  padding: 6px 11px;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.card:hover .card__tag { opacity: 1; transform: translateY(0); }
.card__body {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 20px 4px 6px;
  border-top: 1px solid var(--line);
}
.card__name { font-family: var(--serif); font-size: 27px; line-height: 1.1; }
.card__name .em { font-style: italic; color: var(--accent-deep); }
.card__price { font-size: 12px; letter-spacing: 0.1em; color: var(--ink-faint); white-space: nowrap; }
.card__note { padding: 0 4px 4px; color: var(--ink-soft); font-size: 14.5px; max-width: 90%;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.16,0.84,0.28,1), opacity 0.5s ease, padding 0.6s ease; }
.card:hover .card__note { max-height: 80px; opacity: 1; padding-bottom: 14px; }

/* ============================================================
   Inquiry / closing CTA
   ============================================================ */
.inquiry { position: relative; }
.inquiry__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: start;
}
@media (max-width: 900px) { .inquiry__grid { grid-template-columns: 1fr; gap: 56px; } }

.inquiry h2 { font-size: clamp(40px, 6.5vw, 88px); line-height: 0.98; letter-spacing: -0.01em; }
.inquiry h2 .em { font-style: italic; color: var(--accent-deep); }
.inquiry__copy { color: var(--ink-soft); max-width: 440px; margin-top: 30px; }

.props { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 0; max-width: 460px; }
.props li {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: baseline;
  padding: 18px 0; border-top: 1px solid var(--line);
}
.props li:last-child { border-bottom: 1px solid var(--line); }
.props .idx { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--accent-deep); }
.props .ptxt strong { font-weight: 500; font-family: var(--sans); display: block; letter-spacing: 0.01em; }
.props .ptxt span { color: var(--ink-soft); font-size: 14.5px; }

/* form */
.form { background: var(--paper); border: 1px solid var(--line); padding: clamp(26px, 4vw, 44px); }
.form__title { font-family: var(--serif); font-size: 26px; margin-bottom: 6px; }
.form__sub { color: var(--ink-faint); font-size: 13.5px; margin-bottom: 26px; }
.field { position: relative; margin-bottom: 26px; }
.field label {
  display: block; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 9px;
}
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-weight: 300; font-size: 16px; color: var(--ink);
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  padding: 8px 0; border-radius: 0; outline: none;
  transition: border-color 0.4s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--accent-deep); }
.field select { appearance: none; cursor: pointer; background-image:
  linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
  linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 12px) 16px, calc(100% - 7px) 16px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field textarea { resize: none; min-height: 72px; }
.form .btn { width: 100%; justify-content: center; }
.form__thanks { text-align: center; padding: 30px 8px; }
.form__thanks .mark { font-family: var(--serif); font-style: italic; font-size: 40px; color: var(--accent-deep); }
.form__thanks h4 { font-family: var(--serif); font-weight: 400; font-size: 27px; margin: 14px 0 8px; }
.form__thanks p { color: var(--ink-soft); font-size: 14.5px; }

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 64px 0 40px; position: relative; }
.footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer__brand { font-family: var(--serif); font-size: clamp(40px, 9vw, 120px); line-height: 0.9; letter-spacing: -0.01em; }
.footer__brand .em { font-style: italic; color: var(--accent-deep); }
.footer__cols { display: flex; gap: clamp(34px, 6vw, 80px); flex-wrap: wrap; }
.footer__col h5 { font-family: var(--sans); font-weight: 400; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 16px; }
.footer__col a, .footer__col p { display: block; color: var(--ink-soft); font-size: 14.5px; margin-bottom: 10px; transition: color 0.3s ease; }
.footer__col a:hover { color: var(--accent-deep); }
.footer__base { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.04em; }

/* ============================================================
   Scroll reveals
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1s cubic-bezier(0.16,0.84,0.28,1), transform 1s cubic-bezier(0.16,0.84,0.28,1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-d="1"] { transition-delay: 0.08s; }
[data-reveal-d="2"] { transition-delay: 0.16s; }
[data-reveal-d="3"] { transition-delay: 0.24s; }
[data-reveal-d="4"] { transition-delay: 0.32s; }
[data-reveal-d="5"] { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .strip__track { animation: none; }
  html { scroll-behavior: auto; }
}

/* hero entrance — base state is the VISIBLE state; we animate FROM hidden
   with keyframes so content is never left stranded if motion is throttled. */
.hero .eyebrow { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .line > span { animation: petalRise 1.15s cubic-bezier(0.16,0.84,0.28,1) both; }
  .hero h1 .line:nth-child(2) > span { animation-delay: 0.12s; }
  .hero .eyebrow { animation: petalFade 1s ease 0.05s both; }
  .hero__lede { animation: petalUp 1s ease 0.5s both; }
  .hero__cta  { animation: petalUp 1s ease 0.62s both; }
  .hero__meta { animation: petalFade 1.4s ease 1s both; }
}
@keyframes petalRise { from { transform: translateY(112%); } to { transform: none; } }
@keyframes petalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes petalUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Tweaks panel (vanilla)
   ============================================================ */
#tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 296px; max-width: calc(100vw - 40px);
  background: oklch(0.99 0.006 80 / 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px oklch(0.2 0.02 50 / 0.4);
  font-family: var(--sans);
  display: none;
}
#tweaks.open { display: block; }
.tw__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.tw__head h6 { margin: 0; font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 500; }
.tw__close { background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink-soft); padding: 4px; }
.tw__body { padding: 18px; display: grid; gap: 20px; max-height: 70vh; overflow-y: auto; }
.tw__group > .tw__label { display: block; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 11px; }
.tw__swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.tw__sw { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 1px solid var(--line); position: relative; transition: transform 0.25s ease; }
.tw__sw:hover { transform: scale(1.08); }
.tw__sw.sel { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }
.tw__seg { display: flex; border: 1px solid var(--line); }
.tw__seg button { flex: 1; background: none; border: none; cursor: pointer; font-family: var(--sans); font-size: 11px; letter-spacing: 0.08em; padding: 9px 6px; color: var(--ink-soft); transition: background 0.3s ease, color 0.3s ease; }
.tw__seg button + button { border-left: 1px solid var(--line); }
.tw__seg button.sel { background: var(--ink); color: var(--paper); }
.tw__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tw__row .val { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.tw input[type="range"] { width: 100%; accent-color: var(--accent-deep); }
