/* ==========================================================================
   LumiDi — homepage / first screen
   Collage geometry is measured from foto/main.jpg and expressed in
   percentages of a fixed-aspect "stage", so the composition scales as a unit.
   Stage reference box: 1279 x 436 units (main.jpg, below the header).
   ========================================================================== */

:root {
  --bg:          #f4ede6;
  --bg-header:   #f4ede6;
  --ink:         #1a1613;
  --ink-soft:    #4c443d;
  --line:        #e0d3c3;
  --brown:       #8a5c3a;
  --brown-soft:  #a8815e;
  --card:        #ccd7de;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, 'Courier New', monospace;

  --header-h:  76px;
  --shell:     1600px;
  --gutter:    32px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: clamp(18px, 2.4vw, 42px);
}

.main-nav a {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.82;
  transition: opacity 0.18s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible { opacity: 1; }

.header-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  letter-spacing: 0.08em;
  margin-right: 4px;
}

.lang-option {
  appearance: none;
  background: none;
  border: 0;
  padding: 2px 1px;
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.18s ease;
  border-bottom: 1px solid transparent;
}

.lang-option:hover { color: var(--ink); }

.lang-option.is-active {
  color: var(--ink);
  border-bottom-color: var(--brown-soft);
}

.lang-sep { color: var(--line); }

.icon-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  width: 21px;
  height: 21px;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.18s ease;
}

.icon-btn:hover { opacity: 1; }
.icon-btn svg { width: 100%; height: 100%; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 26px;
  height: 26px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   Hero shell
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

/* Soft feather texture bleeding in from the left edge. The plume is dense on
   its own left side and fades out to the right, so it is hung off-canvas and
   only its soft flank shows; the hard image edges stay outside the hero. */
.fur {
  position: absolute;
  left: -24%;
  top: -12%;
  width: 70%;
  height: auto;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.hero-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  aspect-ratio: 1279 / 436;
  container-type: inline-size;
}

/* fine-line geometry: viewBox matches the stage box exactly */
.arcs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  stroke: var(--brown-soft);
  stroke-width: 0.7;
  opacity: 0.42;
  pointer-events: none;
}

/* ==========================================================================
   Hero copy
   ========================================================================== */

.hero-copy {
  position: absolute;
  left: 3.9%;
  top: 30.5%;
  width: 52%;
  z-index: 6;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 4.25cqw;
  line-height: 1.17;
  letter-spacing: -0.004em;
  color: var(--ink);
}

.hero-sub {
  margin: 1.55cqw 0 0;
  font-size: 1.18cqw;
  line-height: 1.62;
  font-weight: 400;
  color: var(--ink-soft);
}

/* ==========================================================================
   Decorative marks (compass roses, stars, coordinates, tagline)
   ========================================================================== */

.deco {
  position: absolute;
  height: auto;
  pointer-events: none;
  z-index: 2;
}

.compass-lg { left: 14.4%; top: 4.6%;  width: 11.5%; opacity: 0.9; }
.compass-sm { left: 25.8%; top: 79.5%; width: 7.4%;  opacity: 0.78; }
.compass-br { left: 91.6%; top: 78.5%; width: 6.4%;  opacity: 0.72; }

.stargrid   { left: 36.4%; top: 9.6%;  width: 13.4%; opacity: 0.46; }

.star       { width: 1.9%; opacity: 0.7; }
.star-a { left: 7.4%;  top: 15.5%; }
.star-b { left: 16.6%; top: 32.5%; }
.star-c { left: 11.2%; top: 27.5%; width: 1.25%; }

.coords {
  position: absolute;
  margin: 0;
  z-index: 7;
  font-family: var(--font-mono);
  font-size: 0.72cqw;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--brown);
  white-space: nowrap;
  pointer-events: none;
}

.coords-a { left: 3.2%;  top: 19.0%; }
.coords-b { left: 41.0%; top: 85.0%; }
.coords-c { left: 88.0%; top: 4.6%;  }
.coords-d { left: 90.0%; top: 52.5%; }

/* the small filled dot that precedes some coordinate pairs in the reference */
.has-dot::before {
  content: "";
  position: absolute;
  left: -1.5em;
  top: 0.52em;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  background: var(--brown);
}

.tagline {
  position: absolute;
  left: 41.2%;
  top: 59.5%;
  margin: 0;
  z-index: 7;
  font-family: var(--font-mono);
  font-size: 0.68cqw;
  line-height: 2.15;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brown);
  white-space: nowrap;
  pointer-events: none;
}

/* ==========================================================================
   Collage
   Percentages below are relative to the collage box (535 x 460 reference
   units), so every element keeps its position when the collage is resized.
   ========================================================================== */

.collage {
  position: absolute;
  left: 48.2%;
  top: 3.0%;
  width: 41.8%;
  aspect-ratio: 535 / 460;
  z-index: 5;
}

.collage > * {
  position: absolute;
  height: auto;
}

.c-globe    { left:  8.3%; top:  0.2%; width: 33.1%; z-index: 1; opacity: 0.86; }
.c-cream    { left: 23.9%; top: 37.6%; width: 19.6%; z-index: 4; }
.c-gel      { left: -0.6%; top: 57.6%; width: 20.4%; z-index: 8; }
.c-dropper  { left: 57.4%; top: 59.4%; width: 16.9%; z-index: 9; }
.c-bottle   { left: 52.9%; top: 81.0%; width: 13.1%; z-index: 9; }

/* the tall beige column the rest of the collage is built on; cropped from a
   near-square slab, so the box is what makes it a column */
.c-slab {
  left: 14.2%;
  top: 29.6%;
  width: 25.6%;
  height: 70%;
  object-fit: cover;
  object-position: 50% 50%;
  z-index: 2;
}

/* pale card peeking out from behind the portrait */
.c-card {
  left: 88.0%;
  top:  7.5%;
  width: 12.0%;
  height: 44.0%;
  background: var(--card);
  opacity: 0.5;
  z-index: 3;
}

.c-portrait {
  left: 40.7%;
  top:  0;
  width: 51.4%;
  height: 58.3%;
  margin: 0;
  overflow: hidden;
  z-index: 5;
  background: var(--bg);
}

/* The tile crops into the face itself (roughly source 410,30 → 1120,730),
   the way the reference does, instead of framing the dark studio backdrop. */
.c-portrait img {
  position: absolute;
  left: -62%;
  top: -3%;
  width: 163%;
  height: auto;
  max-width: none;
}

/* faint measuring grid laid over the portrait, as in the reference */
.c-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right,  rgba(255,255,255,0.2) 0 1px, transparent 1px 19.9%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.2) 0 1px, transparent 1px 19.9%);
}

.c-water, .c-organic {
  top: 58.3%;
  height: 41.9%;
  object-fit: cover;
  z-index: 6;
}

.c-water   { left: 42.2%; width: 32.1%; object-position: 50% 40%; }
.c-organic { left: 74.3%; width: 25.7%; object-position: 50% 45%; }

/* ==========================================================================
   Tablet — the stage stops being a scaled reproduction and becomes a stack
   ========================================================================== */

@media (max-width: 1099px) {
  .menu-toggle { display: flex; }

  /* the nav leaves the flow, so the controls have to claim the free space */
  .header-actions { margin-left: auto; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 4px var(--gutter) 18px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--line);
  }

  .main-nav.is-open { display: flex; }

  .main-nav a {
    padding: 15px 2px;
    font-size: 16px;
    border-top: 1px solid var(--line);
  }

  .main-nav a:first-child { border-top: 0; }

  .hero { padding: 46px 0 52px; }

  /* the stage becomes an ordered stack: copy → tagline → collage */
  .hero-stage {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    container-type: normal;
    max-width: 760px;
    padding: 0 var(--gutter);
  }

  .hero-copy {
    order: 1;
    position: static;
    width: 100%;
    max-width: 560px;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 5.6vw, 56px);
    line-height: 1.16;
  }

  .hero-sub {
    margin-top: 20px;
    font-size: clamp(15px, 1.9vw, 17px);
  }

  .collage {
    order: 3;
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    margin: 34px auto 0;
    z-index: 5;
  }

  /* keep only the marks that still read at this size */
  .compass-lg {
    left: auto;
    right: 4%;
    top: 0;
    width: 108px;
  }

  .coords-a { left: auto; right: 4%; top: 122px; font-size: 11px; }

  .tagline {
    order: 2;
    position: static;
    margin: 26px 0 0;
    left: auto;
    top: auto;
    font-size: 10px;
  }

  .stargrid, .star, .compass-sm, .compass-br,
  .coords-b, .coords-c, .coords-d { display: none; }

  .arcs { opacity: 0.3; }
  .fur  { left: -22%; top: 12%; width: 60%; opacity: 0.4; }
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 719px) {
  :root { --gutter: 20px; --header-h: 62px; }

  .logo { font-size: 23px; }
  .lang-switch { font-size: 11px; margin-right: 0; }
  .header-actions { gap: 14px; }
  .icon-btn { width: 19px; height: 19px; }

  /* the profile and cart controls are redundant on a first-screen-only page */
  .icon-btn:nth-of-type(2) { display: none; }

  .hero { padding-top: 30px; }

  .hero-stage { max-width: none; padding: 0; }

  .hero-copy {
    padding: 0 var(--gutter);
    max-width: none;
  }

  .hero-copy h1 { font-size: clamp(29px, 8.4vw, 40px); }
  .hero-sub { margin-top: 16px; font-size: 15px; }

  /* full-bleed collage keeps the portrait large on a narrow screen */
  .collage { margin-top: 30px; }

  .compass-lg { width: 74px; right: var(--gutter); top: 4px; }
  .coords-a   { right: var(--gutter); top: 86px; font-size: 10px; }

  .tagline {
    margin: 22px 0 0;
    padding: 0 var(--gutter);
    font-size: 9px;
    letter-spacing: 0.22em;
  }

  .fur { left: -30%; top: 16%; width: 88%; opacity: 0.32; }

  .c-portrait::after { background-image: none; }
}

@media (max-width: 400px) {
  .compass-lg { display: none; }
  .coords-a   { display: none; }
}

/* ==========================================================================
   Preferences
   ========================================================================== */

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