/* ————————————————————————————————————————
   Splits — one thing, cut clean. (v4 — English only)
   light: bg #F4F0E9 · bg2 #E9E3D9 · text #1A1816 · muted #6B6560 · accent #A8432B
   dark:  bg #121110 · bg2 #1C1A18 · text #F5F1EA · muted #A8A29E · accent #E07A5F
   type: Playfair Display + Inter, self-hosted woff2
   motion: loader circle→line → hero cut reveal → fade-ups on scroll → hover lift
———————————————————————————————————————— */

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-italic-var.woff2") format("woff2");
  font-weight: 400 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F4F0E9;
  --bg2: #E9E3D9;
  --text: #1A1816;
  --muted: #6B6560;
  --accent: #A8432B;
  --card: #E9E3D9;
  --rule: rgba(0, 0, 0, 0.05);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}
html.dark {
  --bg: #121110;
  --bg2: #1C1A18;
  --text: #F5F1EA;
  --muted: #A8A29E;
  --accent: #E07A5F;
  --card: #1C1A18;
  --rule: rgba(255, 255, 255, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* paper grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 60;
}

::selection { background: var(--accent); color: var(--bg); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

img { display: block; width: 100%; height: 100%; object-fit: cover; }

section { scroll-margin-top: 88px; }

/* ————— loader ————— */

#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  animation: loaderCut 1.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes loaderCut {
  0% { transform: scale(0.2); opacity: 0; }
  40% { transform: scale(1); opacity: 1; border-radius: 50%; }
  100% { transform: scale(1); border-radius: 0; width: 2px; height: 110px; }
}
.loader-label {
  margin-top: 32px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* ————— scroll progress ————— */

#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 1.5px;
  width: 0%;
  background: var(--accent);
  z-index: 80;
  transition: width 0.1s linear;
}

/* ————— nav ————— */

.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
}
.brand {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
}
.ticker { font-weight: 500; letter-spacing: 0.02em; transition: opacity 0.2s ease; }
.ticker:hover { opacity: 0.6; }

#themeToggle {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
#themeToggle:hover { opacity: 1; }
.x-link { font-size: 15px; opacity: 0.5; transition: opacity 0.2s ease; }
.x-link:hover { opacity: 1; }

/* ————— hero ————— */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 112px 20px 64px;
}
.hero-inner {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
}
.kicker {
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: 3.1rem;
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 em { font-style: italic; }

.hero-media {
  position: relative;
  max-width: 48rem;
  margin: 56px auto 0;
}
.hero-visual {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg2);
  clip-path: inset(0 48% 0 48%);
}
body.ready .hero-visual {
  animation: heroCut 2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}
@keyframes heroCut {
  to { clip-path: inset(0 0 0 0); }
}

.hero-half-left {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 40px;
  background: linear-gradient(145deg, #C2410C, #9A3412);
}
.hero-orange {
  width: 144px;
  height: 144px;
}
.hero-half-right {
  position: absolute;
  inset: 0 0 0 auto;
  width: 50%;
  background: var(--bg2);
}
.cut-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  z-index: 10;
  background: linear-gradient(to bottom, transparent, var(--accent) 15%, var(--accent) 85%, transparent);
}

/* ————— sections ————— */

.section { padding: 96px 20px; }
.section-ruled { border-top: 1px solid var(--rule); }
.wrap { max-width: 72rem; margin-inline: auto; }
.wrap-narrow { max-width: 42rem; margin-inline: auto; }

.section-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 56px;
  max-width: 20ch;
}

/* offscreen sections render lazily — first paint stays light */
.ways, .spec, .gallery, .footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}

/* ————— fade-up on scroll ————— */

.fade-up {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ————— four ways ————— */

.ways-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 24px;
  margin-inline: -20px;
  padding-inline: 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ways-strip::-webkit-scrollbar { display: none; }

.card {
  flex: 0 0 82%;
  scroll-snap-align: center;
  background: var(--card);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.55s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px -18px rgba(0, 0, 0, 0.12);
}

.key {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--accent);
  padding: 16px 16px 0;
  margin-bottom: 12px;
}
.art {
  aspect-ratio: 4 / 5;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.art-03-half {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  background: #1C1917;
}
.art-03-line {
  position: absolute;
  top: 30%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}
.card-copy {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  padding: 16px;
}

/* ————— spec ————— */

.spec-sheet { font-size: 13px; }
.spec-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.spec-row dt { color: var(--muted); }
.spec-row dd { font-weight: 500; text-align: right; }

.spec-note {
  margin-top: 40px;
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
  opacity: 0.65;
}

/* ————— gallery ————— */

.gallery-head { margin-bottom: 56px; }
.gallery-head .section-title { margin-bottom: 16px; }
.gallery-caption {
  font-size: 14px;
  color: var(--muted);
  max-width: 28rem;
}
.gen-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 12px 24px;
  border: 1px solid var(--text);
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}
.gen-btn:hover { background: var(--text); color: var(--bg); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.tile {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  overflow: hidden;
  background: var(--card);
}

/* ————— footer ————— */

.footer {
  padding: 112px 20px;
  text-align: center;
}
.footer-brand {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}
.trade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 40px;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}
.trade:hover { opacity: 0.9; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 32px;
  margin-top: 64px;
  font-size: 11px;
  color: var(--muted);
}
.footer-links a { opacity: 0.7; transition: opacity 0.2s ease; }
.footer-links a:hover { opacity: 1; }

.legal {
  margin: 40px auto 0;
  max-width: 20rem;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  opacity: 0.5;
}

/* ————— tablet ————— */

@media (min-width: 768px) {
  .nav-inner { padding: 20px 40px; }
  .nav-links { gap: 28px; }
  .hero, .section, .footer { padding-left: 40px; padding-right: 40px; }
  .hero { padding-top: 128px; }
  .hero h1 { font-size: 3.75rem; }
  .kicker { font-size: 11px; margin-bottom: 24px; }
  .hero-media { margin-top: 80px; }
  .hero-half-left { padding-bottom: 56px; }
  .hero-orange { width: 208px; height: 208px; }
  .section { padding-top: 144px; padding-bottom: 144px; }
  .section-title { font-size: 48px; }
  .ways-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    overflow: visible;
    margin-inline: 0;
    padding: 0;
  }
  .spec-sheet { font-size: 14px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .gallery-head { margin-bottom: 56px; }
  .footer { padding-top: 160px; padding-bottom: 128px; }
  .footer-brand { font-size: 72px; }
}

/* ————— desktop ————— */

@media (min-width: 1024px) {
  .hero h1 { font-size: 5.4rem; }
  .ways-strip { grid-template-columns: repeat(4, 1fr); gap: 36px; }
  .footer-brand { font-size: 96px; }
}

/* ————— reduced motion ————— */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { transition: none; }
  #loader { display: none; }
  .loader-circle { animation: none; }
  .hero-visual, body.ready .hero-visual { clip-path: none; animation: none; }
  .fade-up { opacity: 1; transform: none; transition: none; }
  .card, .card:hover { transition: none; transform: none; }
  .trade, .ticker, .x-link, .footer-links a, .gen-btn { transition: none; }
  #progress { transition: none; }
}
