/* Kahroba landing — local styles only. No external fonts, scripts, or trackers. */

:root {
  color-scheme: dark;
  --amber: #e8b979;
  --amber-deep: #b86a24;
  --amber-hot: #f3d19a;
  --amber-dim: rgba(232, 185, 121, 0.14);
  --bg: #0e0e10;
  --bg-soft: #14130f;
  --surface: #1a1b1e;
  --surface-2: #222226;
  --text: #f5f2ea;
  --muted: #b9b4aa;
  --line: rgba(232, 185, 121, 0.16);
  --line-strong: rgba(232, 185, 121, 0.32);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 1.25rem;
  --header-h: 4.25rem;
  --max: 72rem;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: ui-serif, Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(184, 106, 36, 0.16), transparent 55%),
    radial-gradient(900px 500px at 0% 20%, rgba(232, 185, 121, 0.06), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
}

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

a {
  color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover, a:focus-visible { color: var(--amber-hot); }

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  z-index: 40;
  border-radius: 0.4rem;
}

.skip:focus { top: 0.75rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.7rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 14, 16, 0.78);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  margin-right: auto;
}

.brand:hover, .brand:focus-visible { color: inherit; }

.brand-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name { font-weight: 650; letter-spacing: 0.01em; }
.brand-sub { color: var(--muted); font-size: 0.75rem; }

.nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.nav a:hover, .nav a:focus-visible { color: var(--text); }

.nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  line-height: 1.2;
}

.btn-primary {
  background: var(--amber);
  color: #1c1812;
}

.btn-primary:hover, .btn-primary:focus-visible {
  color: #1c1812;
  background: var(--amber-hot);
}

.btn-secondary {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  color: var(--text);
  border-color: var(--amber);
}

.btn-download { flex: 0 0 auto; white-space: nowrap; }

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.nav-toggle svg { width: 1.2rem; height: 1.2rem; display: block; margin: auto; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 1.05fr);
  gap: 2rem 3rem;
  align-items: center;
  width: min(var(--max), calc(100% - 3rem));
  margin: 0 auto;
  padding: 3.25rem 0 4.5rem;
  min-height: calc(100svh - var(--header-h));
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3.1rem, 8vw, 6.1rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.tagline {
  margin: 1rem 0 0;
  color: var(--amber);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-style: italic;
  font-weight: 500;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.85rem;
}

.req {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
  margin-top: 2rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--amber-hot);
  letter-spacing: 0.04em;
}

.hud span { white-space: nowrap; }
.hud b { color: var(--muted); font-weight: 500; margin-right: 0.35rem; }

.hero-stage {
  position: relative;
  min-height: 34rem;
  height: min(42rem, 78svh);
  perspective: 1400px;
  isolation: isolate;
}

#aperture {
  position: absolute;
  inset: -18%;
  width: 136%;
  height: 136%;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}

.phone-tilt {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  transform-style: preserve-3d;
  transform: rotateY(-16deg) rotateX(7deg);
  will-change: transform;
}

.phone-tilt img {
  width: min(22.5rem, 72%);
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.62));
  user-select: none;
  pointer-events: none;
}

/* Sections */
.section {
  width: min(var(--max), calc(100% - 3rem));
  margin: 0 auto;
  padding: 4.25rem 0;
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2.25rem;
}

.section h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-head p {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.card.wide { grid-column: span 7; }
.card.narrow { grid-column: span 5; }
.card.third { grid-column: span 4; }

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}

.card p { margin: 0; color: var(--muted); }

.card-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: center;
}

.card .phone-mini {
  width: 9.8rem;
  justify-self: end;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.45));
}

/* AI */
.ai-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2.5rem;
  align-items: center;
  background:
    radial-gradient(500px 220px at 85% 0%, rgba(232, 185, 121, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  padding: 2.2rem 2.2rem 2.2rem 2.4rem;
}

.ai-readout {
  display: grid;
  gap: 0.7rem;
  font-family: var(--mono);
}

.ai-readout div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(14, 14, 16, 0.55);
}

.ai-readout b { color: var(--muted); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.ai-readout span { color: var(--amber-hot); font-size: 1.05rem; }

.ai-note {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Gallery */
.gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(12.5rem, 16.5rem);
  gap: 1.4rem;
  overflow-x: auto;
  padding: 1.25rem 0.5rem 1.75rem 0.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery-track::-webkit-scrollbar { height: 8px; }
.gallery-track::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}

.shot {
  scroll-snap-align: start;
  transform: perspective(900px) rotateY(var(--tilt, -8deg));
  transition: transform 0.4s ease;
}

.shot:nth-child(even) { --tilt: 8deg; }

.shot:hover, .shot:focus-within {
  transform: perspective(900px) rotateY(0deg) translateY(-6px);
}

.shot img {
  width: 100%;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.5));
}

.shot figcaption {
  margin: 0.85rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Download band */
.download-band {
  text-align: center;
  padding: 4.5rem 1.5rem;
  border-block: 1px solid var(--line);
  background:
    radial-gradient(700px 260px at 50% 0%, rgba(232, 185, 121, 0.14), transparent 65%),
    var(--bg-soft);
}

.download-band h2 { margin: 0; }
.download-band p {
  margin: 0.85rem auto 0;
  max-width: 32rem;
  color: var(--muted);
}

.download-band .hero-actions { justify-content: center; }

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2.25rem 1.4rem 2.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
}

.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--amber); }

.site-footer p { margin: 0; }
.site-footer p + p { margin-top: 0.35rem; }

/* Document pages (support, privacy, 404) */
body.doc {
  background: var(--bg);
}

.doc-main {
  width: min(44rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.4rem 0 3.5rem;
  flex: 1;
}

.doc-main h1 {
  margin: 0 0 0.4rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}

.doc-main h2 {
  margin: 2rem 0 0.7rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

.doc-main h2:first-child { margin-top: 0; }

.doc-main p, .doc-main ul { margin: 0 0 1rem; }
.doc-main ul { padding-left: 1.2rem; }
.doc-main li + li { margin-top: 0.35rem; }

.meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.2rem !important; }

.note {
  padding: 0.95rem 1.05rem;
  border-left: 3px solid var(--amber);
  background: var(--surface);
  border-radius: 0 0.7rem 0.7rem 0;
}

.faq { display: grid; gap: 0.9rem; }

.faq article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem 1.1rem 0.15rem;
}

.faq h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }

/* Reveal: content stays visible (important for crawlers and below-the-fold readers). */
.reveal.is-in {
  animation: rise 0.7s ease;
}

@keyframes rise {
  from { opacity: 0.2; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Grain overlay */
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("../assets/grain.png");
  background-size: 128px 128px;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.2rem 1rem;
    background: rgba(14, 14, 16, 0.96);
    border-bottom: 1px solid var(--line);
  }
  .site-header.is-open .nav { display: flex; }
  .nav a { padding: 0.65rem 0; width: 100%; }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 2rem 0 3rem;
    width: min(var(--max), calc(100% - 2rem));
  }
  .hero-stage {
    overflow: hidden;
    min-height: 26.5rem;
    height: 28.5rem;
    order: -1;
  }
  .phone-tilt { transform: rotateY(-8deg) rotateX(5deg); }
  .phone-tilt img { width: min(16.8rem, 60%); }
  #aperture { inset: -8%; width: 116%; height: 116%; }
  .section { width: min(var(--max), calc(100% - 2rem)); padding: 3rem 0; }
  .card.wide, .card.narrow, .card.third { grid-column: span 12; }
  .card-row { grid-template-columns: 1fr auto; }
  .ai-panel {
    grid-template-columns: 1fr;
    padding: 1.4rem;
  }
  .feature-grid { grid-template-columns: repeat(12, 1fr); }
}

@media (max-width: 520px) {
  .site-header { padding: 0.6rem 0.9rem; }
  .brand-sub { display: none; }
  .hero-stage { overflow: hidden; min-height: 24rem; height: 25.5rem; }
  .card .phone-mini { width: 7.6rem; }
  .card-row { grid-template-columns: 1fr; }
  .card .phone-mini { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal.is-in, .shot, .phone-tilt { animation: none !important; transition: none !important; transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}
