/* kepvana.com: the app's look (design C, cognac): warm porcelain with a cognac glow, white cards
   with a faint cognac edge, and the brand green. The home page shows the app's own screens (D-67). Manrope is served
   from this site (fonts/, SIL Open Font License), so the site makes no outside requests. */

@font-face { font-family: Manrope; src: url('/fonts/manrope-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Manrope; src: url('/fonts/manrope-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: Manrope; src: url('/fonts/manrope-800.ttf') format('truetype'); font-weight: 800; font-display: swap; }

:root {
  --bg: #F7F4F0;
  --glow: #EEDCC6;
  --card: #FFFFFF;
  --edge: rgba(138, 87, 50, 0.14);
  --tile: #F3E7D9;
  --cognac: #8A5732;
  --ink: #101828;
  --muted: #555E70;
  --green: #0E5C43;
  --green-text: #0B7350;
  --on-green: #FFFFFF;
  --hair: #E8E1D8;
  --shadow: 0 1px 2px rgba(60, 40, 20, 0.05), 0 12px 32px -12px rgba(138, 87, 50, 0.22);
  --radius: 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0E13;
    --glow: rgba(176, 120, 72, 0.22);
    --card: #161B23;
    --edge: rgba(224, 180, 138, 0.12);
    --tile: #2A231D;
    --cognac: #E0B48A;
    --ink: #F2F4F7;
    --muted: #A6AEBB;
    --green: #0E7A55;
    --green-text: #5FD4A4;
    --hair: #262C35;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* The home page's tilted phones may reach past the screen's edge; they're cut there, never scrolled to. */
html, body { overflow-x: clip; }
body {
  margin: 0;
  /* The cognac glow from the top, as on the app's welcome screen: part of the page itself, so
     there's no edge under the header. */
  background: radial-gradient(ellipse 70% 640px at 50% 0, var(--glow), transparent 100%) no-repeat, var(--bg);
  color: var(--ink);
  font: 500 17px/1.6 Manrope, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green-text); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- Header and footer ---------- */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand b { color: var(--green-text); font-weight: 800; }
.nav { display: flex; gap: 22px; font-weight: 700; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.foot { margin-top: 72px; padding: 32px 0 48px; border-top: 1px solid var(--hair); color: var(--muted); font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { color: var(--muted); }

/* ---------- Home (design A, "Porcelain gallery", D-67) ----------
   The app's own screens, from a made-up business (supabase/staging-tests/seed-website-demo.mjs),
   in a drawn phone. Few words: each section is a heading, one line and a screen. */
.phone {
  position: relative; width: var(--w, 280px); aspect-ratio: 602 / 1310; flex: none;
  border-radius: calc(var(--w, 280px) * 0.16); padding: calc(var(--w, 280px) * 0.034);
  background: linear-gradient(145deg, #2a2d33, #0b0c0f 40%, #1c1f24);
  box-shadow: 0 2px 0 1px rgba(255, 255, 255, 0.08) inset, 0 50px 80px -30px rgba(80, 50, 20, 0.45), 0 20px 30px -20px rgba(0, 0, 0, 0.35);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--w, 280px) * 0.13); }
/* The camera island, drawn over the screen's status bar. */
.phone::after {
  content: ''; position: absolute; top: calc(var(--w, 280px) * 0.055); left: 50%; transform: translateX(-50%);
  width: 31%; height: calc(var(--w, 280px) * 0.09); border-radius: 99px; background: #000;
}

.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; padding: 40px 0 72px; }
.hero > * { min-width: 0; }
.eyebrow { font-size: 15px; font-weight: 700; color: var(--cognac); letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(44px, 6.4vw, 80px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; margin-top: 16px; }
.hero h1 span { color: var(--green-text); }
.lede { font-size: clamp(19px, 2.2vw, 22px); color: var(--muted); margin-top: 22px; }
.status {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 32px; padding: 12px 20px; white-space: nowrap;
  border-radius: 999px; background: var(--card); border: 1px solid var(--edge); box-shadow: var(--shadow);
  font-size: 15px; font-weight: 800;
}
.status i { width: 9px; height: 9px; border-radius: 50%; background: var(--green-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-text) 22%, transparent); }
.stage { position: relative; height: 640px; }
.stage .phone { position: absolute; }
.stage .p1 { --w: 290px; left: 50%; top: 10px; transform: translateX(-50%); z-index: 3; }
.stage .p2 { --w: 240px; left: 2%; top: 90px; transform: rotate(-8deg); z-index: 2; }
.stage .p3 { --w: 240px; right: 2%; top: 90px; transform: rotate(8deg); z-index: 1; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 64px 0; }
.row.flip .text { order: 2; }
.row .kicker { font-size: 14px; font-weight: 800; color: var(--cognac); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.row h2 { font-size: clamp(34px, 4.4vw, 54px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; }
.row p { font-size: 20px; color: var(--muted); margin-top: 16px; max-width: 26em; text-wrap: pretty; }
.row .shot { display: flex; justify-content: center; }
.row .phone { --w: 300px; }

.trades { text-align: center; padding: 64px 0 24px; }
.trades h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 820px; margin: 26px auto 0; padding: 0; list-style: none; }
.chips li { padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--edge); font-size: 15px; font-weight: 700; }
.note { color: var(--muted); margin-top: 18px; font-size: 15px; }

.band {
  margin-top: 56px; background: var(--green); color: var(--on-green); border-radius: 36px; padding: 52px 48px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px 40px;
}
.band h2 { font-size: clamp(30px, 3.8vw, 46px); font-weight: 800; letter-spacing: -0.03em; max-width: 12em; }
.band p { margin-top: 14px; opacity: 0.92; font-size: 16px; }
.band a { color: #fff; font-weight: 800; }
.band ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-weight: 800; font-size: 18px; }
.band li { position: relative; padding-left: 30px; }
.band li::before { content: '✓'; position: absolute; left: 0; color: #9BE3C2; }

/* ---------- Legal and help pages ---------- */
.doc { padding: 24px 0 0; }
.doc .kicker { font-size: 14px; font-weight: 700; color: var(--cognac); }
.doc h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 800; margin-top: 6px; }
.doc .effective { color: var(--muted); margin-top: 10px; font-size: 15px; }
.doc h2 { font-size: 24px; font-weight: 800; margin: 40px 0 12px; scroll-margin-top: 16px; }
.doc h3 { font-size: 18px; font-weight: 800; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--ink); }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 22px; margin: 10px 0; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--cognac); }
.doc .short { background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-top: 28px; }
.doc .short h2 { margin-top: 0; font-size: 20px; }
.toc { margin-top: 24px; padding: 18px 22px; border-radius: 16px; border: 1px solid var(--hair); }
.toc p { font-weight: 800; font-size: 15px; }
.toc ol { columns: 2; column-gap: 32px; font-size: 15px; margin-bottom: 0; }
.table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--hair); }
.table th { font-weight: 800; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
.contact-card { margin-top: 18px; padding: 22px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.contact-card .email { font-size: 22px; font-weight: 800; }
details { border-bottom: 1px solid var(--hair); padding: 14px 0; }
summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--cognac); font-size: 22px; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { color: var(--muted); margin-top: 8px; }

/* Placeholders the owner fills in before anything is published: marked so they can't be missed. */
.fill { background: #FFE9A8; color: #5A4300; border-radius: 6px; padding: 0 6px; font-weight: 800; white-space: nowrap; }
.draft { margin: 0 0 8px; padding: 14px 18px; border-radius: 14px; background: #FFF4D6; color: #5A4300; border: 1px solid #F2D58A; font-size: 15px; }
.draft b { font-weight: 800; }

@media (max-width: 860px) {
  .hero, .row { grid-template-columns: 1fr; gap: 28px; }
  .hero { text-align: center; padding-top: 20px; }
  .hero h1 { font-size: clamp(36px, 11vw, 72px); }
  .stage { height: 520px; }
  .stage .p1 { --w: 240px; }
  .stage .p2, .stage .p3 { --w: 190px; top: 70px; }
  .row { padding: 40px 0; text-align: center; }
  .row.flip .text { order: 0; }
  .row p { margin-left: auto; margin-right: auto; }
  .row .phone { --w: 250px; }
  .band { padding: 36px 26px; border-radius: 28px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { gap: 14px; font-size: 14px; }
  .nav .hide-sm { display: none; }
  .toc ol { columns: 1; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { padding: 10px 0; border-bottom: 1px solid var(--hair); }
  .table td { border: 0; padding: 2px 0; }
  .table td:first-child { font-weight: 800; }
}

/* Small phones: the status pill stays on one line; the smallest get smaller phones too. */
@media (max-width: 370px) {
  .status .xs-hide { display: none; }
  .status { font-size: 14px; padding: 10px 16px; white-space: normal; }
}
@media (max-width: 340px) {
  .stage { height: 460px; }
  .stage .p1 { --w: 210px; }
  .stage .p2, .stage .p3 { --w: 165px; }
}
