/* ==========================================================================
   LUXX Miami · styles/base.css
   Fonts, tokens, reset, shared controls (.btn, .link, .eyebrow), header,
   collections, services, inquiry, footer. Inside .horizon only the shared
   controls, .sr-only and element defaults apply (horizon.css owns the rest).
   Hooks: .site-header.is-solid (JS, >=900px) · html.no-js · .site-nav__list
   a[aria-current] · .btn--line[aria-pressed="true"] · .site-header__count[hidden]
   ========================================================================== */


/* 1. Fonts
   ========================================================================== */

@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../assets/uploads/luxx-montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url('../assets/uploads/luxx-open-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched fallbacks: the swap moves no line. Liberation Sans shares
   Arial's metrics, so the same overrides hold on Linux. */
@font-face {
  font-family: 'Montserrat Fallback';
  src: local('Arial'), local('ArialMT'), local('Liberation Sans');
  ascent-override: 85.79%; descent-override: 22.25%; line-gap-override: 0%; size-adjust: 112.83%;
}

@font-face {
  font-family: 'Open Sans Fallback';
  src: local('Arial'), local('ArialMT'), local('Liberation Sans');
  ascent-override: 101.65%; descent-override: 27.86%; line-gap-override: 0%; size-adjust: 105.15%;
}


/* 2. Tokens
   ========================================================================== */

:root {
  --plaster: #F4F4F2; --paper: #FFFFFF; --ink: #111111; --ink-2: #5B616B;
  --silver: #E5E7EB; --grey: #99A1AF; --tile: #0A0A0A;
  --rule: rgba(17, 17, 17, .22); --rule-soft: rgba(17, 17, 17, .12);
  --gold: #ECAC36; --gold-hi: #F6C766;
  --afternoon: #F2EEE7; --dusk: #DCE0E5;

  --font-display: 'Montserrat', 'Montserrat Fallback', system-ui, sans-serif;
  --font-text: 'Open Sans', 'Open Sans Fallback', system-ui, sans-serif;

  --ease-aperture: cubic-bezier(.65, 0, .25, 1);
  --ease-settle: cubic-bezier(.2, .8, .25, 1);
  --dur-ui: 280ms; --dur-ui-slow: 420ms;

  --margin: 20px; --gutter: 16px; --frame: 1600px;
  /* Height of the FIXED header laid over the page: 88px from 900px. Below
     900px the header is in flow (126px tall), so there is nothing to clear. */
  --header-h: 0px;

  /* Side padding that holds a full-width box's content to the frame (the
     frame includes the margins). It contains a %, so use it only as the
     padding of a full-width box. -l / -r also respect the notch. */
  --frame-inset: max(var(--margin), calc((100% - var(--frame)) / 2 + var(--margin)));
  --inset-l: max(var(--frame-inset), env(safe-area-inset-left, 0px));
  --inset-r: max(var(--frame-inset), env(safe-area-inset-right, 0px));

  color-scheme: light;
  accent-color: var(--ink);
}

@media (min-width: 900px) { :root { --margin: 40px; --gutter: 24px; --header-h: 88px; } }
@media (min-width: 1200px) { :root { --margin: 56px; } }


/* 3. Reset and base
   ========================================================================== */

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

/* No scroll-behavior: smooth. Lenis scrolls, and native smoothing breaks
   ScrollTrigger's pin math. */
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scrollbar-color: var(--ink) var(--plaster); scrollbar-width: thin;
}

body {
  background: var(--plaster); color: var(--ink);
  font: 400 17px/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (min-width: 1200px) { body { font-size: 18px; } }

/* Safety net: nothing in main may widen the page. clip creates no scroll
   container, so sticky and fixed pins inside keep working. */
main { display: block; overflow-x: clip; }

img, picture { display: block; max-width: 100%; height: auto; }
svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button:not(:disabled) { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display); font-weight: 330; letter-spacing: -.035em; line-height: 1;
  text-wrap: balance; overflow-wrap: break-word;
}

/* Explicit size: no legacy "h1 inside section" UA sizing, no console warning. */
h1 { font-size: 2em; }
p { text-wrap: pretty; overflow-wrap: break-word; }

::selection { background: var(--gold); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--plaster); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 2px solid var(--plaster); }


/* 4. Focus, utilities, Lenis
   ========================================================================== */

/* Ink, not gold: gold is too faint on white and plaster. */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.site-footer :focus-visible { outline-color: var(--gold); }

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

.skip-link {
  position: fixed; top: 12px; left: max(12px, env(safe-area-inset-left, 0px)); z-index: 100;
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  background: var(--gold); color: var(--ink);
  font: 600 12.5px/1.2 var(--font-display); letter-spacing: .18em;
  text-transform: uppercase; text-decoration: none;
  transform: translateY(calc(-100% - 24px));
  transition: transform var(--dur-ui) var(--ease-settle);
}

.skip-link:focus { transform: none; }

/* Lenis 1.3 (its stylesheet is not linked) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis.lenis-autoToggle {
  transition-property: overflow; transition-duration: 1ms; transition-behavior: allow-discrete;
}


/* 5. Buttons and links (site-wide, including inside .horizon)
   ========================================================================== */

.btn {
  --btn-pad: 26px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  /* The end side gives back the trailing tracking: optically centred label. */
  padding: 8px calc(var(--btn-pad) - .18em) 8px var(--btn-pad);
  border: 1px solid transparent; /* also the button's edge in forced colours */
  border-radius: 0;
  font: 600 12.5px/1.2 var(--font-display); letter-spacing: .18em;
  text-transform: uppercase; text-align: center; text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-ui) var(--ease-settle), background-color var(--dur-ui) var(--ease-settle),
    border-color var(--dur-ui) var(--ease-settle);
}

.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .45; pointer-events: none; }

/* Primary: charcoal on gold, never gold text. A band of light crosses the
   face once on hover / focus and the surface stays lit (gold-hi). Both band
   positions are off-canvas and only the hover / focus rules transition
   background-position, so the reset on leave is invisible. */
.btn--gold {
  --btn-sweep: color var(--dur-ui) var(--ease-settle), background-color var(--dur-ui) var(--ease-settle),
    border-color var(--dur-ui) var(--ease-settle), background-position 900ms var(--ease-settle);
  color: var(--ink); background-color: var(--gold);
  background-image: linear-gradient(105deg,
    rgb(255 255 255 / 0) 38%, rgb(255 255 255 / .5) 50%, rgb(255 255 255 / 0) 62%);
  background-size: 260% 100%; background-position: 120% 0; background-repeat: no-repeat;
}

.btn--gold:focus-visible {
  background-color: var(--gold-hi); background-position: -20% 0; transition: var(--btn-sweep);
}

.btn--line { color: var(--ink); background-color: transparent; border-color: var(--ink); }

.btn--line:focus-visible,
.btn--line[aria-pressed='true'] { color: var(--plaster); background-color: var(--ink); }

/* Text link: the hairline sweeps out to the right and back in from the left. */
.link {
  position: relative;
  display: inline-flex; align-items: center; min-height: 44px;
  padding-block: 14px; /* the label box always ends 14px above the bottom, even wrapped */
  color: var(--ink);
  font: 600 12px/16px var(--font-display); letter-spacing: .18em;
  text-transform: uppercase; text-align: start; text-decoration: none;
  transition: color var(--dur-ui) var(--ease-settle);
}

.link::after {
  content: '';
  position: absolute; left: 0; right: .18em; /* ends at the last glyph, not its tracking */
  bottom: 12px; height: 1px;
  background: currentColor;
  transform-origin: 0 50%;
  forced-color-adjust: none;
}

.link:focus-visible::after { animation: link-sweep 650ms var(--ease-settle); }
.link:active { opacity: .64; }

@media (hover: hover) {
  .btn--gold:hover {
    background-color: var(--gold-hi); background-position: -20% 0; transition: var(--btn-sweep);
  }
  .btn--line:hover { color: var(--plaster); background-color: var(--ink); }
  .link:hover::after { animation: link-sweep 650ms var(--ease-settle); }
}

.btn--gold:active { background-color: var(--gold); }

/* Out to the right (same as scaleX from a right origin), a beat of rest,
   then drawn in again from the left. */
@keyframes link-sweep {
  0% { transform: translateX(0) scaleX(1); animation-timing-function: cubic-bezier(.65, 0, .25, 1); }
  42% { transform: translateX(100%) scaleX(0); }
  52% { transform: translateX(0) scaleX(0); animation-timing-function: cubic-bezier(.2, .8, .25, 1); }
  100% { transform: translateX(0) scaleX(1); }
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--ink-2);
  font: 600 12px/16px var(--font-display); letter-spacing: .22em; text-transform: uppercase;
}


/* 6. Header
   ========================================================================== */

.site-header { position: relative; z-index: 50; background-color: var(--plaster); }
.site-header__bar { display: grid; align-items: center; }

.brand {
  display: grid; place-items: center; width: 64px; height: 64px;
  background: var(--tile); -webkit-tap-highlight-color: transparent;
}

.brand__logo { object-fit: contain; }

/* Scoped to the header tile so the footer logo keeps its own size. */
.brand .brand__logo { width: 52px; height: 52px; transition: transform var(--dur-ui-slow) var(--ease-settle); }

.brand:focus-visible .brand__logo { transform: scale(1.04); }

.site-nav__list { display: flex; margin: 0; padding: 0; list-style: none; }

/* 8px of extra hit area per side, given back by the negative margin. */
.site-nav__list a {
  position: relative;
  display: inline-flex; align-items: center; min-height: 44px;
  margin-inline: -8px; padding: 14px 8px;
  color: var(--ink);
  font: 600 12px/16px var(--font-display); letter-spacing: .2em;
  text-transform: uppercase; text-decoration: none;
}

.site-nav__list a::after {
  content: '';
  position: absolute; left: 8px; right: calc(8px + .2em); bottom: 12px; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform var(--dur-ui-slow) var(--ease-settle);
  forced-color-adjust: none;
}

.site-nav__list a:focus-visible::after,
.site-nav__list a[aria-current]:not([aria-current='false'])::after { transform: scaleX(1); }
.site-nav__list a:active { opacity: .64; }

.site-header__count {
  display: inline-grid; place-items: center;
  min-width: 22px; min-height: 22px; margin-left: 4px; padding: 0 6px;
  background: var(--ink); color: var(--gold);
  font: 600 12px/1 var(--font-display); letter-spacing: 0; font-variant-numeric: tabular-nums;
  transition: opacity var(--dur-ui) var(--ease-settle), transform var(--dur-ui-slow) var(--ease-settle);
}

/* The class sets display, so [hidden] needs restating. Revealed by JS, the
   badge scales in from its starting style instead of popping. */
.site-header__count[hidden] { display: none; }

@starting-style { .site-header__count { opacity: 0; transform: scale(.4); } }

@media (hover: hover) {
  .brand:hover .brand__logo { transform: scale(1.04); }
  .site-nav__list a:hover::after { transform: scaleX(1); }
}

/* Phones and small tablets: in flow (not sticky); brand + CTA, then the nav. */
@media (max-width: 899.98px) {
  .site-header__bar {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: 'brand cta' 'nav nav';
    padding: 12px var(--inset-r) 0 var(--inset-l);
  }

  .brand { grid-area: brand; width: 52px; height: 52px; }
  .brand .brand__logo { width: 42px; height: 42px; }
  .site-header__cta { --btn-pad: 18px; grid-area: cta; justify-self: end; min-height: 44px; }

  .site-nav {
    grid-area: nav; margin-top: 12px;
    border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft);
  }

  .site-nav__list { justify-content: space-between; gap: 0; }
  .site-nav__list a { min-height: 48px; padding-block: 16px; }
  .site-nav__list a::after { bottom: 14px; }
}

/* Desktop: fixed and transparent over the horizon until JS sets .is-solid
   (solid at once without JS). The empty bar lets the pointer through to the
   scene; only its controls catch it. */
@media (min-width: 900px) {
  .site-header {
    position: fixed; inset: 0 0 auto 0; height: var(--header-h);
    background-color: transparent; box-shadow: 0 1px 0 rgba(17, 17, 17, 0);
    pointer-events: none;
    transition: background-color var(--dur-ui) var(--ease-settle), box-shadow var(--dur-ui) var(--ease-settle);
  }

  .site-header.is-solid,
  .no-js .site-header {
    background-color: var(--plaster); box-shadow: 0 1px 0 var(--rule-soft);
    pointer-events: auto;
  }

  .site-header__bar {
    grid-template-columns: auto 1fr auto auto; height: 100%;
    padding: 0 var(--inset-r) 0 var(--inset-l);
  }

  .brand, .site-nav, .site-header__cta { pointer-events: auto; }
  .brand { grid-column: 1; }
  .site-nav { grid-column: 3; }
  .site-nav__list { gap: 36px; }
  .site-header__cta { grid-column: 4; margin-left: 32px; }
}


/* 7. Collections, product, services, inquiry
   ========================================================================== */

.collection, .services, .inquiry {
  position: relative;
  padding: 96px var(--inset-r) 80px var(--inset-l);
  border-top: 1px solid var(--rule-soft);
  scroll-margin-top: 0;
}

.collection__head { margin-bottom: 64px; }

.collection__title {
  margin: 0 0 24px;
  font-size: clamp(40px, 6vw, 104px); font-weight: 330; letter-spacing: -.04em; line-height: .98;
}

.collection__lede { max-width: 34rem; color: var(--ink); }

/* Product: anchor targets of the horizon captions, so they clear the fixed
   header when jumped to. */
.product {
  display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 24px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.product__media { background: var(--silver); } /* placeholder while the lazy image decodes */
.product__media img { width: 100%; height: auto; }

.product__name {
  margin: 0 0 24px;
  font-size: clamp(28px, 2.6vw, 40px); font-weight: 400; letter-spacing: -.02em; line-height: 1.05;
}

.specs { display: grid; margin: 0 0 28px; }

.specs > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px 0; border-top: 1px solid var(--rule-soft);
}

.specs > div:last-child { border-bottom: 1px solid var(--rule-soft); }

.specs dt {
  color: var(--ink-2);
  font: 600 12px/16px var(--font-display); letter-spacing: .18em; text-transform: uppercase;
}

.specs dd {
  margin: 0; color: var(--ink);
  font-size: 17px; line-height: 1.4; text-align: end; font-variant-numeric: tabular-nums;
}

.product__actions,
.inquiry__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

.catalog:empty { display: none; }

/* Services */
.services__group { margin-top: 72px; }

.services__label {
  margin: 0 0 32px; padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font: 600 13px/1.4 var(--font-display); letter-spacing: .22em; text-transform: uppercase;
}

.services__list {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px;
  margin: 0; padding: 0; list-style: none;
}

.services__list li { display: flex; flex-direction: column; align-items: flex-start; max-width: 34rem; }

.services__list h4 {
  margin: 0 0 12px;
  font-size: clamp(22px, 1.8vw, 28px); font-weight: 400; letter-spacing: -.015em; line-height: 1.15;
}

.services__list p { margin: 0 0 12px; }
.services__intro { max-width: 40rem; margin: 0 0 24px; }

.services__links {
  display: flex; flex-wrap: wrap; gap: 8px 40px;
  margin: 0; padding: 0; list-style: none;
}

/* Inquiry */
.inquiry__panel {
  max-width: 760px; padding: clamp(28px, 4vw, 56px);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--rule-soft);
}

.inquiry__empty { margin: 0 0 28px; font-size: 18px; }
.inquiry__note { margin: 24px 0 0; color: var(--ink-2); font-size: 15px; }

@media (min-width: 900px) {
  .collection, .services, .inquiry { padding-top: 160px; padding-bottom: 120px; }

  .collection__head {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  }

  .collection__head > * { grid-column: 1 / span 7; }
  .collection__lede { font-size: 18px; }

  .product { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
  /* start: a taller info column must not stretch the picture past its image. */
  .product__media { grid-column: 1 / span 7; align-self: start; }
  .product__info { grid-column: 8 / span 5; align-self: end; padding-bottom: 8px; }

  .services__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
}


/* 8. Footer: the night, where the gold logo sits naturally
   ========================================================================== */

.site-footer {
  display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 40px;
  padding: 96px var(--inset-r) max(48px, calc(env(safe-area-inset-bottom, 0px) + 24px)) var(--inset-l);
  background: var(--tile); color: var(--silver);
}

.brand__logo--footer { width: 80px; height: 80px; margin-bottom: 20px; }

.site-footer__name {
  margin: 0 0 6px;
  color: var(--paper);
  font: 600 13px/1.4 var(--font-display); letter-spacing: .22em; text-transform: uppercase;
}

.site-footer__tag { margin: 0; color: var(--silver); font-size: 17px; }

.site-footer__contact { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }

.site-footer__contact a {
  display: inline-flex; align-items: center; min-height: 44px; max-width: 100%;
  color: var(--paper);
  font: 400 clamp(20px, 1.6vw, 26px)/1.25 var(--font-display); letter-spacing: -.01em;
  text-decoration-line: underline; text-decoration-color: transparent;
  text-underline-offset: .24em;
  overflow-wrap: anywhere;
  transition: text-decoration-color var(--dur-ui) var(--ease-settle);
}

.site-footer__contact a:focus-visible { text-decoration-color: var(--gold); }

.site-footer__social {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  margin: 0; padding: 0; list-style: none;
}

.site-footer__social a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--silver);
  font: 600 12px/16px var(--font-display); letter-spacing: .2em;
  text-transform: uppercase; text-decoration: none;
  transition: color var(--dur-ui) var(--ease-settle);
}

.site-footer__social a:focus-visible { color: var(--gold); } /* ~9.9:1 on the tile */
.site-footer a:active { opacity: .64; }

@media (hover: hover) {
  .site-footer__contact a:hover { text-decoration-color: var(--gold); }
  .site-footer__social a:hover { color: var(--gold); }
}

/* margin-top + the 40px row gap = 72px on mobile. */
.site-footer__fine {
  grid-column: 1 / -1;
  margin: 32px 0 0; padding-top: 24px;
  border-top: 1px solid rgba(229, 231, 235, .16);
  color: var(--grey); /* ~7.6:1 on the tile */
  font-size: 14px; line-height: 1.6;
}

@media (min-width: 900px) {
  .site-footer { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
  .site-footer__brand { grid-column: 1 / span 4; }
  /* The e-mail address is ~13.6em wide: five columns here, four from 1200px
     (three, as in 6-8, would wrap it below ~1500px). */
  .site-footer__contact { grid-column: 5 / span 5; }
  .site-footer__social { grid-column: 10 / span 3; }
  .site-footer__fine { margin-top: 72px; }
}

@media (min-width: 1200px) { .site-footer__contact { grid-column: 6 / span 4; } }


/* 9. Reduced motion: nothing travels; colour and opacity changes remain.
   No global kill-switch, so horizon.css keeps its own reduced-motion fades.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .skip-link, .brand .brand__logo { transition: none; }
  .brand:hover .brand__logo, .brand:focus-visible .brand__logo, .btn:active { transform: none; }

  /* Gold buttons: no sweep; hover / focus keep the lit gold-hi surface. */
  .btn--gold { background-image: none; }

  /* Count badge fades in at full size (the scale snaps while invisible). */
  .site-header__count { transition: opacity var(--dur-ui) linear; }

  /* Nav underline fades in place instead of drawing. */
  .site-nav__list a::after { transform: none; opacity: 0; transition: opacity var(--dur-ui) linear; }
  .site-nav__list a:focus-visible::after,
  .site-nav__list a[aria-current]:not([aria-current='false'])::after { opacity: 1; }

  /* Links: the hairline fades out and back on the sweep's beat, in place.
     Colour untouched, so links that horizon.css recolours keep their contrast. */
  .link:focus-visible::after { animation: link-fade 650ms var(--ease-settle); }

  @media (hover: hover) {
    .site-nav__list a:hover::after { opacity: 1; }
    .link:hover::after { animation: link-fade 650ms var(--ease-settle); }
  }
}

@keyframes link-fade {
  0%, 100% { opacity: 1; }
  42%, 52% { opacity: 0; }
}
