/* Prototype C — ui-ux-pro-max design system
   Pattern: Scroll-triggered storytelling + Portfolio grid. Style: Motion-driven. Pure black + white. */

:root {
  --color-primary: #18181B;
  --color-on-primary: #FFFFFF;
  --color-secondary: #27272A;
  --color-accent: #F8FAFC;
  --color-on-accent: #0F172A;
  --color-background: #000000;
  --color-foreground: #FAFAFA;
  --color-card: #0C0C0C;
  --color-muted: #181818;
  --color-muted-foreground: #A1A1AA;
  --color-border: #3F3F46;
  --color-ring: #FFFFFF;

  --font-heading: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;

  /* spacious spacing scale (density 3) */
  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 32px;
  --space-5: 48px; --space-6: 64px; --space-7: 96px; --space-8: 128px;
  --radius: 14px;
  --container: 1280px;
  --t-fast: 180ms; --t-mid: 320ms; --t-slow: 600ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--color-background); color: var(--color-foreground); font-family: var(--font-body); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 3px; border-radius: 4px; }
.container { width: min(100% - 2 * var(--space-3), var(--container)); margin-inline: auto; }
.muted { color: var(--color-muted-foreground); }
.icon { width: 20px; height: 20px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Scroll progress indicator */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.progress span { display: block; height: 100%; background: var(--color-foreground); transform-origin: 0 50%; transform: scaleX(0); }

/* Header */
.header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease); border-bottom: 1px solid transparent; }
.header.scrolled .nav a { text-shadow: none; }
.header.scrolled { background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(12px); border-color: var(--color-secondary); }
.header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); height: 72px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.brand span { font-size: 0.75rem; color: var(--color-muted-foreground); letter-spacing: 0.02em; }
.nav { display: flex; align-items: center; gap: var(--space-4); }
.nav a { text-decoration: none; font-size: 0.9375rem; color: #E4E4E7; text-shadow: 0 1px 12px rgba(0,0,0,.5); transition: color var(--t-fast) ease; padding: 10px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--color-foreground); }
.lang { display: inline-flex; gap: 2px; border: 1px solid var(--color-border); border-radius: 999px; padding: 3px; }
.lang a { font-size: 0.75rem; padding: 6px 10px; border-radius: 999px; text-decoration: none; color: var(--color-muted-foreground); }
.lang a[aria-current="true"] { background: var(--color-foreground); color: var(--color-background); }
.menu-btn { display: none; background: none; border: 1px solid var(--color-border); color: inherit; border-radius: 999px; min-height: 44px; padding: 0 16px; align-items: center; gap: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 500; text-decoration: none; border: 1px solid transparent; transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) ease, color var(--t-fast) ease; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:hover { background: #E2E8F0; }
.btn-ghost { border-color: var(--color-border); color: var(--color-foreground); background: transparent; }
.btn-ghost:hover { background: var(--color-secondary); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; transform: scale(1.08); }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,.85) 100%); }
.hero-content { position: relative; padding-bottom: var(--space-7); display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-5); align-items: end; }
.hero h1 { font-size: clamp(2.75rem, 7vw, 6.5rem); font-weight: 600; }
.hero-side { display: flex; flex-direction: column; gap: var(--space-3); }
.hero-side p { font-size: 1.125rem; color: #E4E4E7; max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.scroll-cue { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--color-muted-foreground); text-decoration: none; }
.scroll-cue .icon { animation: bob 2s var(--ease) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* Stats strip */
.facts { border-block: 1px solid var(--color-secondary); }
.facts .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: var(--space-5) var(--space-3); border-left: 1px solid var(--color-secondary); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact strong { display: block; font-family: var(--font-heading); font-size: 2rem; font-weight: 600; }
.fact span { color: var(--color-muted-foreground); font-size: 0.9375rem; }

/* Section heads */
.section { padding-block: var(--space-8); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.section-head p { max-width: 46ch; color: var(--color-muted-foreground); font-size: 1.0625rem; }

/* Filter chips */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-4); }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--color-border); background: transparent; color: var(--color-muted-foreground); transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease; }
.chip:hover { color: var(--color-foreground); border-color: #71717A; }
.chip[aria-pressed="true"] { background: var(--color-foreground); color: var(--color-background); border-color: var(--color-foreground); }

/* Masonry */
.masonry { columns: 3 320px; column-gap: var(--space-2); }
.tile { position: relative; display: block; width: 100%; margin: 0 0 var(--space-2); padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--color-muted); break-inside: avoid; color: inherit; text-align: left; }
.tile img { width: 100%; transition: transform var(--t-slow) var(--ease), filter var(--t-slow) var(--ease); }
.tile .tile-label { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-3) var(--space-2) var(--space-2); background: linear-gradient(180deg, transparent, rgba(0,0,0,.8)); display: flex; justify-content: space-between; align-items: center; opacity: 0; transform: translateY(8px); transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease); font-size: 0.9375rem; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); }
.tile:hover .tile-label, .tile:focus-visible .tile-label { opacity: 1; transform: none; }
.tile[hidden] { display: none; }
@media (hover: none) { .tile .tile-label { opacity: 1; transform: none; } }

/* Chapters */
.chapter { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: center; padding-block: var(--space-7); }
.chapter + .chapter { border-top: 1px solid var(--color-secondary); }
.chapter.reverse .chapter-media { order: 2; }
.chapter-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.chapter-media img { width: 100%; height: 100%; object-fit: cover; }
.chapter-kicker { color: var(--color-muted-foreground); font-size: 0.875rem; margin-bottom: var(--space-2); }
.chapter h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: var(--space-3); }
.chapter p { color: #D4D4D8; max-width: 48ch; }
.chapter .btn { margin-top: var(--space-4); }

/* About */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-6); align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about-media .badge { position: absolute; right: -16px; bottom: 32px; background: var(--color-foreground); color: var(--color-background); border-radius: var(--radius); padding: 16px 20px; font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }
.about h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--space-3); }
.about p + p { margin-top: var(--space-2); }
.about p { color: #D4D4D8; max-width: 58ch; }

/* Prices */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--color-border); border-radius: 999px; margin-bottom: var(--space-5); }
.tab { min-height: 44px; padding: 0 22px; border-radius: 999px; border: 0; background: transparent; color: var(--color-muted-foreground); transition: background-color var(--t-fast) ease, color var(--t-fast) ease; }
.tab[aria-selected="true"] { background: var(--color-foreground); color: var(--color-background); }
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-2); }
.price-card { background: var(--color-card); border: 1px solid var(--color-secondary); border-radius: var(--radius); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); transition: border-color var(--t-mid) ease, transform var(--t-mid) var(--ease); }
.price-card:hover { border-color: #52525B; transform: translateY(-2px); }
.price-card h3 { font-size: 1.25rem; }
.price-card .price { font-family: var(--font-heading); font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.price-card .price small { font-size: 0.875rem; color: var(--color-muted-foreground); font-weight: 400; margin-left: 4px; }
.price-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: #D4D4D8; font-size: 0.9375rem; }
.price-card li { display: flex; gap: 10px; align-items: flex-start; }
.price-card li .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--color-muted-foreground); }
.price-card .btn { margin-top: auto; }
.price-card.featured { border-color: var(--color-foreground); }
.tag { align-self: flex-start; font-size: 0.75rem; padding: 4px 10px; border-radius: 999px; background: var(--color-foreground); color: var(--color-background); }
.tabpanel[hidden] { display: none; }
.note-list { margin-top: var(--space-5); display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-2); }
.note { border: 1px solid var(--color-secondary); border-radius: var(--radius); padding: var(--space-3); }
.note h3 { font-size: 1rem; margin-bottom: 6px; }
.note p { color: var(--color-muted-foreground); font-size: 0.9375rem; }

/* Contact form */
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-6); }
.contact h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--space-3); }
.contact-info { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.contact-info div { display: flex; gap: 12px; color: #D4D4D8; }
.contact-info .icon { color: var(--color-muted-foreground); margin-top: 3px; }
.form { background: var(--color-card); border: 1px solid var(--color-secondary); border-radius: var(--radius); padding: var(--space-5); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.875rem; font-weight: 500; }
.field input, .field select, .field textarea { background: var(--color-background); color: var(--color-foreground); border: 1px solid var(--color-border); border-radius: 10px; min-height: 48px; padding: 12px 14px; font: inherit; transition: border-color var(--t-fast) ease; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 1px; border-color: transparent; }
.field .help { font-size: 0.8125rem; color: var(--color-muted-foreground); }
.field .error { font-size: 0.8125rem; color: #FCA5A5; }
.field.invalid input, .field.invalid textarea { border-color: #EF4444; }
.form-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.form-status { font-size: 0.9375rem; }

/* Footer */
.footer { border-top: 1px solid var(--color-secondary); padding-block: var(--space-5); }
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); font-size: 0.875rem; color: var(--color-muted-foreground); }
.footer nav { display: flex; gap: var(--space-3); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--color-foreground); }

/* Page head (gallery, prices) */
.page-head { padding-top: calc(72px + var(--space-7)); padding-bottom: var(--space-5); }
.page-head h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.page-head p { margin-top: var(--space-3); max-width: 56ch; color: var(--color-muted-foreground); font-size: 1.125rem; }
.crumbs { display: flex; gap: 8px; font-size: 0.875rem; color: var(--color-muted-foreground); margin-bottom: var(--space-3); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--color-foreground); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.96); display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: 72px 1fr 64px; opacity: 0; visibility: hidden; transition: opacity var(--t-mid) var(--ease), visibility 0s var(--t-mid); }
.lightbox.open { opacity: 1; visibility: visible; transition: opacity var(--t-mid) var(--ease); }
.lightbox figure { grid-column: 2; grid-row: 2; margin: 0; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lb-btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--color-border); background: rgba(0,0,0,.5); color: var(--color-foreground); transition: background-color var(--t-fast) ease; justify-self: center; align-self: center; }
.lb-btn:hover { background: var(--color-secondary); }
.lb-close { grid-column: 3; grid-row: 1; }
.lb-prev { grid-column: 1; grid-row: 2; }
.lb-next { grid-column: 3; grid-row: 2; }
.lb-count { grid-column: 2; grid-row: 3; text-align: center; align-self: center; color: var(--color-muted-foreground); font-size: 0.875rem; }

/* Reveal (GSAP sets the final state; without JS everything is visible) */
.js [data-stagger] > *, .js [data-fade] { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .js [data-stagger] > *, .js [data-fade] { opacity: 1; } .hero-media img { transform: none; } .scroll-cue .icon { animation: none; } }

/* Responsive */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; }
  .chapter, .about, .contact { grid-template-columns: 1fr; gap: var(--space-4); }
  .chapter.reverse .chapter-media { order: 0; }
  .facts .container { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 768px) {
  .nav, .header .lang { display: none; }
  .menu-btn { display: inline-flex; }
  .header.open { background: #000; }
  .header.open .container { flex-wrap: wrap; height: auto; padding-block: 14px; }
  .header.open .nav { display: flex; flex-direction: column; align-items: flex-start; width: 100%; gap: 0; }
  .header.open .nav a { padding: 12px 0; font-size: 1.125rem; }
  .header.open .lang { display: inline-flex; margin-top: 8px; }
  .section { padding-block: var(--space-7); }
  .form { grid-template-columns: 1fr; padding: var(--space-3); }
  .about-media .badge { right: 12px; }
  .lightbox { grid-template-columns: 52px 1fr 52px; }
  .masonry { columns: 2 150px; column-gap: 8px; }
  .tile { margin-bottom: 8px; border-radius: 10px; }
}
