/* BALTICCA — static site
   Design language from the Figma "Circle-K" template. Typeface: Optima.
   Dark-luxury, editorial, fully responsive. Self-contained (no CDN). */

:root {
  --ink: #000000;           /* black text */
  --ink-soft: rgba(0, 0, 0, 0.72);
  --paper: #ffffff;         /* white background everywhere (default) */
  --paper-2: #ffffff;
  --line: rgba(0, 0, 0, 0.16);
  --gold: #000000;         /* accent text is black (was gold #b09626) */
  --tan: #a88f78;           /* hamburger box (from Figma) */
  --dark: #14120f;
  --mist: #ebebeb;          /* gallery / split background (Figma #ccc @ 40% over white) */
  --white: #ffffff;
  --header-h: 72px;
  --max: 1320px;
  --pad: clamp(1.25rem, 4vw, 5rem);
  /* Optima with graceful fallbacks for non-Apple systems */
  --font: "Optima", "Optima nova", "URW Classico", Candara, "Segoe UI",
          "Gill Sans", "Gill Sans MT", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font); font-weight: 400; line-height: 1.1; letter-spacing: .005em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
p { margin: 0 0 1.2em; }

.eyebrow {
  display: inline-block; color: var(--gold);
  font-size: .72rem; letter-spacing: .28em; text-transform: uppercase;
  margin-bottom: 1.4rem;
}

/* ---------------- header ---------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  height: auto; padding: 16px 48px 0;
  background: var(--paper); border-bottom: 0;
  color: var(--ink);
  transition: background .35s ease, color .35s ease;
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 17px; width: auto; display: block; }
.brand-logo path { fill: currentColor; }

/* always transparent over hero pages — never a solid bar on scroll.
   The logo tone follows the section currently under the header (toggled by
   site.js): WHITE over dark sections, BLACK over light sections. */
body.hero-header .site-header { background: transparent; border-color: transparent; color: var(--white); }
body.hero-header .site-header.over-light { color: var(--ink); }

/* push non-hero pages below the fixed header */
main { display: block; }
body:not(.hero-header) main { padding-top: var(--header-h); }

/* hamburger button — a solid white box, shown at ALL widths (web + mobile) */
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 52px; height: 52px; padding: 0; cursor: pointer; z-index: 210;
  background: #fff; border: 0;
  transition: background .25s ease;
}
.nav-toggle:hover { background: #f2f2f2; }
/* no blue browser focus ring on click; keep a subtle keyboard-only outline */
.nav-toggle, .nav-close { -webkit-tap-highlight-color: transparent; outline: none; }
.nav-toggle:focus, .nav-close:focus { outline: none; }
.nav-toggle:focus-visible, .nav-close:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: #000; transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* full-screen overlay menu — centred, editorial, dark-luxury (all widths) */
.site-nav {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(.4rem, 1.4vh, 1.2rem);
  padding: 2rem;
  background: var(--dark); color: var(--white);
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.site-nav.open { opacity: 1; visibility: visible; }
.site-nav a {
  position: relative; color: var(--white); padding: .35rem 0; border: 0;
  font-size: clamp(1.6rem, 5.2vw, 3.1rem); font-weight: 400; letter-spacing: .12em;
  text-transform: uppercase; line-height: 1.25;
  opacity: 0; transform: translateY(12px);
  transition: color .2s ease, opacity .34s cubic-bezier(.22,.61,.36,1), transform .34s cubic-bezier(.22,.61,.36,1);
}
/* snappy but smooth staggered reveal once the overlay is open;
   closing drops the delays (scoped to .open) so it collapses fast */
.site-nav.open a { opacity: 1; transform: none; }
.site-nav.open a:nth-child(2) { transition-delay: .05s; }
.site-nav.open a:nth-child(3) { transition-delay: .09s; }
.site-nav.open a:nth-child(4) { transition-delay: .13s; }
.site-nav.open a:nth-child(5) { transition-delay: .17s; }
.site-nav.open a:nth-child(6) { transition-delay: .21s; }
.site-nav.open a:nth-child(7) { transition-delay: .25s; }
.site-nav a::after {
  content: ""; position: absolute; left: 50%; bottom: .05rem; width: 0; height: 1px;
  background: var(--white); transform: translateX(-50%); transition: width .3s ease;
}
.site-nav a:hover { color: var(--white); }
.site-nav a:hover::after { width: 100%; }
.site-nav a.active { color: var(--white); }
.site-nav a.active::after { width: 100%; }

/* big X close button, top-right of the overlay */
.nav-close {
  position: absolute; top: clamp(1rem, 3vw, 2.1rem); right: clamp(1rem, 3vw, 2.4rem);
  width: 58px; height: 58px; padding: 0; cursor: pointer;
  background: transparent; border: 0; color: var(--white);
  display: grid; place-items: center;
  transition: color .25s ease, transform .35s ease;
}
.nav-close::before, .nav-close::after {
  content: ""; position: absolute; width: 30px; height: 1.5px; background: currentColor;
}
.nav-close::before { transform: rotate(45deg); }
.nav-close::after { transform: rotate(-45deg); }
.nav-close:hover { color: var(--white); transform: rotate(90deg); }

.nav-backdrop { display: none; }
body.nav-open { overflow: hidden; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-block; font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  padding: 1rem 2.6rem; border: 1px solid var(--ink); color: var(--ink);
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.light { border-color: rgba(255,255,255,.75); color: var(--white); }
.btn.light:hover { background: var(--white); color: var(--ink); }
/* INQUIRE button: border + label in the hamburger tan */
.btn.inquire { border-color: var(--tan); color: var(--tan); }
.btn.inquire:hover { background: var(--tan); border-color: var(--tan); color: var(--white); }

/* ---------------- hero ---------------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: flex-end;
  background-size: cover; background-position: center; color: var(--white);
  padding: 0 var(--pad) clamp(3rem, 8vh, 6rem);
}
/* soft loading: a dark cover fades away once the hero photo has decoded
   (added by site.js; without JS the cover stays invisible, so nothing breaks) */
.hero-scrim { position: absolute; inset: 0; background: #14120f; opacity: 0; pointer-events: none; z-index: 0; transition: opacity .8s ease; }
.hero.is-loading .hero-scrim { opacity: 1; }
.hero.is-ready .hero-scrim { opacity: 0; }

/* the same soft loading for section photos: site.js marks each <img> with
   .soft-load and it stays invisible until decoded, then fades in. The
   card/tile variants must restate the hover-zoom transition so both animate;
   gallery images keep their own crossfade — while still loading they stay
   hidden even when .is-active. */
img.soft-load { opacity: 0; transition: opacity .8s ease; }
img.soft-load.is-ready { opacity: 1; }
.card-img img.soft-load { transition: opacity .8s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.coll-tile img.soft-load { transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.split-media[data-gallery] img.soft-load:not(.is-ready) { opacity: 0; }
.hero-content { position: relative; z-index: 1; max-width: 760px; }
.hero-content.center { margin: 0 auto; text-align: center; padding-bottom: 2vh; }
.hero-content h1 { color: var(--white); font-size: clamp(2.6rem, 7vw, 5rem); }

/* product hero: lamp name sits 48px from the right + bottom edges (Figma) */
.product-hero { justify-content: flex-end; padding: 0 48px 48px; }
.product-hero .hero-content { text-align: right; }
.product-hero .hero-content h1 { font-size: clamp(2rem, 6vw, 42px); line-height: 1.1; }

/* light-toned heroes (pale product photos): use black text for legibility */
.hero.tone-light .hero-content h1 { color: #000; }
.hero.tone-light .hero-eyebrow,
.hero.tone-light .hero-by { color: rgba(0,0,0,.72); }
.hero.tone-light .scroll-cue { color: #000; }
.hero-eyebrow { font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: .8rem; }
.hero-by { font-size: .95rem; letter-spacing: .12em; opacity: .85; margin: 0; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.2rem); max-width: 620px; margin: 0 auto 2rem; opacity: .95; }
.home-hero .hero-content.center .hero-sub { margin-inline: auto; }
/* lift the CTA clear of the scroll arrow */
.home-hero .hero-content.center { padding-bottom: clamp(4rem, 9vh, 6.5rem); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 48px; transform: translateX(-50%); z-index: 2;
  display: grid; place-items: center; color: var(--white);
  animation: bob 2.4s ease-in-out infinite;
}
.scroll-icon { width: 17px; height: auto; display: block; }
@keyframes bob { 0%,100% { transform: translate(-50%,0);} 50% { transform: translate(-50%,6px);} }
/* vertical-only variant for the mobile bottom-left placement (no -50% shift) */
@keyframes bob-y { 0%,100% { transform: translateY(0);} 50% { transform: translateY(6px);} }

/* ---------------- band (welcome / intro) ---------------- */
.band { padding: clamp(4rem, 11vw, 8.5rem) var(--pad); text-align: center; }
.band-inner { max-width: 900px; margin: 0 auto; }
.band-lead { font-size: clamp(1.35rem, 2.8vw, 2rem); line-height: 1.5; color: var(--ink); }

/* ---------------- full-bleed figure ---------------- */
.figure-full img { width: 100%; max-height: 90vh; object-fit: cover; }

/* ---------------- product block ---------------- */
.product-block { padding: clamp(3.5rem, 8vw, 6.5rem) var(--pad); text-align: center; }
.product-block-inner { max-width: 680px; margin: 0 auto; }
.product-block h2 { font-size: clamp(2rem, 5vw, 3rem); }
.product-block .lead { font-size: 1.15rem; line-height: 1.75; color: var(--ink-soft); margin-bottom: 2rem; }

/* ---------------- split (seamless assembling) ---------------- */
/* two square-ish halves side by side (Figma: 840×840 blocks) */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; background: var(--mist); }
.split-media { min-height: 50vw; background: var(--mist); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-text { display: flex; flex-direction: column; justify-content: center; padding: clamp(2.5rem, 6vw, 6rem); position: relative; }
.split-text h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.split-text p { color: var(--ink-soft); }

/* gallery: crossfade carousel inside a square-ish media block */
.split-media[data-gallery] { position: relative; overflow: hidden; }
.split-media[data-gallery] img { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.split-media[data-gallery] img.is-active { opacity: 1; }
.gallery-dots { display: flex; gap: 12px; margin-top: 2.5rem; }
.gallery-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); opacity: .22; cursor: pointer; transition: opacity .3s ease; }
.gallery-dots button.is-active { opacity: 1; }
.gallery-arrows { position: absolute; right: clamp(2.5rem, 6vw, 6rem); bottom: clamp(2.5rem, 6vw, 6rem); display: flex; gap: 2rem; }
.gallery-arrows button { display: flex; padding: .25rem; border: 0; background: none; color: var(--ink); cursor: pointer; opacity: .75; transition: opacity .3s ease; }
.gallery-arrows button:hover { opacity: 1; }
.gallery-arrows svg { width: 11px; height: 22px; display: block; }

/* ---------------- details ---------------- */
.details { padding: clamp(3.5rem, 8vw, 6.5rem) var(--pad); }
.details-inner { max-width: var(--max); margin: 0 auto; }
.details h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 2.5rem; }
.detail-row { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 1px solid var(--line); }
.detail-label { font-weight: 700; letter-spacing: .04em; }
.detail-val { color: var(--ink-soft); font-size: .98rem; }
.detail-val img { display: inline-block; margin: 0; }
.detail-val a { color: var(--gold); }

/* ---------------- nature (dark forest) ---------------- */
.nature {
  position: relative; background: var(--dark) center/cover no-repeat;
  color: var(--white); text-align: center; padding: clamp(5rem, 13vw, 10rem) var(--pad);
}
.nature::before { content: ""; position: absolute; inset: 0; background: rgba(10,9,7,.5); transition: background-color .8s ease; }
/* soft loading (same as the hero scrim): the overlay starts solid and eases
   back to the usual 50% tint once the forest photo has decoded */
.nature.is-loading::before { background: #14120f; }
.nature.is-ready::before { background: rgba(10,9,7,.5); }
.nature-inner { position: relative; max-width: 760px; margin: 0 auto; }
.nature h2 { color: var(--white); font-size: clamp(2rem, 5vw, 3.2rem); text-transform: uppercase; letter-spacing: .04em; }
.nature p { font-size: 1.1rem; opacity: .92; margin-bottom: 2rem; }
.nature .eyebrow { color: var(--white); }

/* ---------------- product grid ---------------- */
.grid-section { padding: clamp(3rem, 7vw, 5.5rem) var(--pad) clamp(4rem, 9vw, 7rem); max-width: var(--max); margin: 0 auto; }
.grid-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2.5rem; gap: 1rem; }
.grid-head h2 { margin: 0; }
.grid-more { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.grid-more:hover { color: var(--gold); }
.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.75rem); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-img { overflow: hidden; background: var(--paper-2); aspect-ratio: 4/5; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-img img { transform: scale(1.05); }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1rem; gap: 1rem; }
.card-title { font-size: 1.25rem; }
.card-price { color: var(--ink-soft); font-size: .85rem; letter-spacing: .04em; }

/* ---------------- collection (Figma 1:1) ---------------- */
.coll-head { max-width: var(--max); margin: 0 auto; padding: 120px var(--pad); text-align: center; }
.coll-head h1 { text-transform: uppercase; letter-spacing: .03em; font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin-bottom: .6rem; }
.coll-head p { max-width: 620px; margin: 0 auto; color: var(--ink-soft); }
.coll-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.coll-tile { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; }
.coll-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.coll-tile:hover img { transform: scale(1.05); }
.coll-name {
  position: absolute; z-index: 1; color: var(--white);
  left: clamp(1.25rem, 2.6vw, 2.75rem); bottom: clamp(1.1rem, 2.4vw, 2rem);
  font-size: clamp(1.35rem, 2.2vw, 2rem); letter-spacing: .02em; text-transform: uppercase;
}
.coll-tile.tone-light .coll-name { color: #000; }

/* ---------------- page head + rich content ---------------- */
.page-head { max-width: var(--max); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) var(--pad) 1rem; text-align: center; }
.page-head h1 { margin: 0 0 .3em; }
.page-head p { max-width: 640px; margin: 1rem auto 0; color: var(--ink-soft); }
.rich { max-width: 900px; margin: 0 auto; padding: 2rem var(--pad) clamp(4rem, 9vw, 6rem); }
.rich img { width: 100%; margin: 2.5rem auto; }
.rich h1 { text-align: center; margin: 2.5rem 0 1rem; }
.rich h2, .rich h3 { text-align: center; }
.rich h3 { font-weight: 400; font-size: clamp(1.2rem, 2.6vw, 1.6rem); line-height: 1.5; margin: 1.5rem 0; }
.rich h6 { text-align: center; font-size: .74rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin: 3rem 0 .5rem; font-weight: 400; }
.rich p { font-size: 1.08rem; }
.rich a { color: var(--gold); }
.rich .btn { margin-top: 1rem; }

/* ---------------- footer (centred, 8px rhythm) ---------------- */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 96px var(--pad) 48px; text-align: center; }
.foot-nav { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.foot-nav a { font-size: 1rem; letter-spacing: .04em; color: var(--ink); transition: color .2s; }
.foot-nav a:hover { color: var(--ink-soft); }
.foot-legal { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 48px; }
.foot-legal a { font-size: .95rem; letter-spacing: .02em; color: var(--ink-soft); transition: color .2s; }
.foot-legal a:hover { color: var(--ink); }
.foot-logo { display: inline-block; margin-top: 80px; color: var(--ink); }
.foot-logo .brand-logo { height: 24px; width: auto; }
.foot-bottom { margin-top: 24px; font-size: .74rem; letter-spacing: .05em; color: var(--ink-soft); }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-media { min-height: 52vh; }
}
@media (max-width: 760px) {
  .coll-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .detail-row { grid-template-columns: 1fr; gap: .35rem; }
  .detail-label { font-size: .95rem; }
}

/* ---------------- mobile layout (Figma mobile frames, 414px reference) ------
   Everything below 760px only — the desktop layout is untouched. */
@media (max-width: 760px) {
  /* logo + hamburger sit 20px from the screen edges (Figma: x=20 / right 20) */
  .site-header { padding: 16px 20px 0; }
  .product-hero { padding: 0 20px 24px; }

  /* NOTE: sizes use vw instead of aspect-ratio — older iOS Safari (<15)
     doesn't know aspect-ratio and collapses boxes with only absolutely
     positioned children. 157vw = the Figma 414×650 frame (650/414). */

  /* heroes with a dedicated portrait photo (data-bg-mobile, swapped by
     site.js) match the Figma 414×650 frame — the 2000×3140 shots fit 1:1 */
  .hero[data-bg-mobile] { min-height: 157vw; }

  /* the scroll cue sits in the bottom-left corner (bounces vertically only) */
  .scroll-cue { left: 20px; bottom: 24px; transform: none; animation-name: bob-y; }

  /* full-bleed figures become near-fullscreen vertical panels (Figma 414×650);
     portrait photos served via <picture> fit 1:1, landscape ones cover-crop */
  .figure-full img { max-height: none; height: 157vw; object-fit: cover; }

  /* square gallery: full-width 1:1 photo with centred dots right below it
     (site.js moves .gallery-nav out of .split-text on mobile); arrows are
     replaced by thumb swipes. The 1:1 box comes from padding-top, which the
     absolutely positioned gallery images then fill. */
  .split-media { min-height: 0; }
  .split-media[data-gallery] { padding-top: 100%; }
  .split > .gallery-nav { display: flex; justify-content: center; padding: 24px 0 4px; }
  .split > .gallery-nav .gallery-dots { margin: 0; }
  .gallery-arrows { display: none; }

  /* NATURE: near-fullscreen vertical panel with centred copy (Figma 414×650) */
  .nature { display: flex; align-items: center; justify-content: center; min-height: 157vw; padding: 3rem 20px; }
}
