/* ============================================================
   Real estate toolkit - showcase page (Givata)
   Light, editorial, one deep-green accent. Deliberately a
   different register from /lattice (light violet) and
   /pdf-forge (dark amber). Four of the five apps are dark, so
   screenshots sit on the page as objects, framed and shadowed.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

:root {
  --bg:        oklch(0.985 0.004 100);
  --surface:   oklch(0.963 0.006 105);
  --surface-2: oklch(0.930 0.008 110);
  --ink:       oklch(0.225 0.014 155);
  --muted:     oklch(0.450 0.014 155);
  --faint:     oklch(0.575 0.012 155);
  --line:      oklch(0.885 0.008 120);
  --line-2:    oklch(0.820 0.010 120);

  --primary:      oklch(0.505 0.112 158);
  --primary-hi:   oklch(0.435 0.110 158);
  --primary-tint: oklch(0.945 0.030 158);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --shell: 1180px;
  --pad: clamp(1.15rem, 4vw, 2.25rem);
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: clamp(1rem, 0.97rem + 0.14vw, 1.06rem);
  line-height: 1.62;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad); }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 500;
  background: var(--primary); color: #fff; padding: 0.6rem 1rem;
  border-radius: var(--r-sm); font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.3rem, 1.45rem + 3.7vw, 3.9rem); }
h1 em { font-style: normal; color: var(--primary); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.55rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem); }
h4 { font-size: 1.05rem; letter-spacing: -0.015em; }

.eyebrow {
  font-family: var(--mono); font-size: 0.73rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 1.1rem;
}
.lede { color: var(--muted); font-size: clamp(1.04rem, 1rem + 0.34vw, 1.2rem); max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.62rem 1.05rem; border-radius: 999px;
  font-weight: 600; font-size: 0.94rem; letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hi); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}
.nav--scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 1.5rem; height: 66px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; letter-spacing: -0.02em; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.nav__links { display: flex; gap: 1.4rem; margin-left: auto; font-size: 0.93rem; color: var(--muted); }
.nav__links a:hover { color: var(--primary); }
.nav__menu { display: none; width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line-2); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav__menu span { width: 16px; height: 1.5px; background: var(--ink); display: block; }

@media (max-width: 940px) {
  .nav__links {
    position: absolute; inset: 66px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--pad) 1rem; display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-left: auto; }
  .nav__menu { display: flex; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section__head { max-width: 66ch; margin-bottom: clamp(2.2rem, 4.5vw, 3.2rem); }
.section__head h2 { margin-bottom: 1rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.hero h1 { margin-bottom: 1.4rem; max-width: 18ch; }
.hero__lede { margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.5rem; }
.hero__note { color: var(--faint); font-size: 0.92rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: clamp(2.2rem, 4.5vw, 3.2rem); }
.stat { background: var(--bg); padding: 1.25rem 1.35rem; }
.stat b { display: block; font-family: var(--mono); font-size: 1.45rem; color: var(--primary); letter-spacing: -0.02em; }
.stat span { display: block; color: var(--faint); font-size: 0.85rem; margin-top: 0.3rem; }

/* ---------- Video ---------- */
.videoframe {
  border: 1px solid var(--line-2); border-radius: var(--r-xl); overflow: hidden;
  background: oklch(0.16 0.01 150);
  box-shadow: 0 30px 70px -40px oklch(0.2 0.05 150 / 0.45);
}
.videoframe video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.videoframe--pending { aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; padding: 2rem; color: oklch(0.7 0.02 150); }
.videoframe--pending .mono { color: oklch(0.85 0.09 158); }
.videoframe__cap { color: var(--faint); font-size: 0.9rem; margin-top: 0.9rem; text-align: center; }

/* ---------- Workflow chain ---------- */
.chain { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.chain__step { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem 1.35rem; position: relative; }
.section--tint .chain__step { background: var(--bg); }
.chain__k { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.6rem; }
.chain__step h4 { margin-bottom: 0.4rem; }
.chain__step p { color: var(--muted); font-size: 0.9rem; }

/* ---------- App blocks ---------- */
.app { padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.app:first-of-type { border-top: 0; }
.app__head { display: flex; flex-wrap: wrap; gap: 0.9rem 1.2rem; align-items: baseline; margin-bottom: 1.1rem; }
.app__name { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem); font-weight: 700; letter-spacing: -0.03em; }
.app__tag { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); background: var(--primary-tint); border-radius: 999px; padding: 0.25rem 0.7rem; }
.app__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.2rem); align-items: start; margin-bottom: clamp(1.8rem, 3.5vw, 2.5rem); }
.app__grid > * { min-width: 0; }
.app__grid p { color: var(--muted); margin-bottom: 1rem; }
@media (max-width: 880px) { .app__grid { grid-template-columns: 1fr; } }

.feat-list { display: grid; gap: 0.65rem; }
.feat-list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--muted); font-size: 0.96rem; }
.feat-list svg { flex: none; margin-top: 0.34rem; color: var(--primary); }

/* ---------- Shots ---------- */
.shot { border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); box-shadow: 0 24px 60px -38px oklch(0.2 0.04 150 / 0.55); }
.shot img { width: 100%; height: auto; }
.shot--tall img { max-height: 620px; object-fit: cover; object-position: top center; }
.shot__cap { color: var(--faint); font-size: 0.85rem; margin-top: 0.7rem; }
.shots-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.shots-2 > * { min-width: 0; }
@media (max-width: 880px) { .shots-2 { grid-template-columns: 1fr; } }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1rem; }
.fcard { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.35rem 1.45rem; }
.fcard h4 { margin-bottom: 0.5rem; }
.fcard p { color: var(--muted); font-size: 0.92rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.chip { font-family: var(--mono); font-size: 0.77rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.3rem 0.75rem; }

/* ---------- CTA ---------- */
.cta-band { padding: clamp(3.2rem, 6vw, 5.5rem) 0; }
.cta-panel {
  border: 1px solid var(--line-2); border-radius: var(--r-xl);
  background: linear-gradient(150deg, var(--primary-tint), var(--surface));
  padding: clamp(2.1rem, 5vw, 3.4rem); text-align: center;
}
.cta-panel h2 { margin-bottom: 0.9rem; }
.cta-panel p { color: var(--muted); margin-bottom: 1.7rem; max-width: 54ch; margin-inline: auto; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2.4rem 0 3rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.footer__tag { color: var(--faint); font-size: 0.9rem; }
.footer__links { display: flex; gap: 1.2rem; margin-left: auto; font-size: 0.9rem; color: var(--muted); }
.footer__links a:hover { color: var(--primary); }
.footer__legal { width: 100%; color: var(--faint); font-size: 0.85rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.footer__legal a { color: var(--primary); }

/* ---------- Reveals ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Givata home link (back to givata.com root) */
.nav__lead { display: inline-flex; align-items: center; gap: 0.7rem; min-width: 0; }
.nav__home { display: inline-flex; align-items: center; gap: 0.4em; color: var(--muted); font-weight: 600; font-size: 0.9rem; letter-spacing: -0.01em; transition: color 0.2s var(--ease); }
.nav__home:hover { color: var(--ink); }
.nav__home img { width: 22px; height: 22px; border-radius: 6px; display: block; }
.nav__sep { width: 1px; height: 20px; background: var(--line-2); flex-shrink: 0; }
@media (max-width: 560px) { .nav__home span { display: none; } .nav__lead { gap: 0.5rem; } }
