/* Haftra site styles. Palette mirrors Denge/Theme.swift so the site and the app
   read as one product. Light and dark are both first-class. */

:root {
  --aubergine: #4a1f3d;
  --plum: #6b295f;
  --coral: #f27d66;
  --cream: #fff5ee;
  --ink: #261421;
  --lilac: #cfadd1;

  --bg: var(--cream);
  --surface: #ffffff;
  --text: var(--ink);
  --muted: #6c5a66;
  --border: #efe0e6;
  --accent: var(--aubergine);
  --shadow: 0 18px 40px rgba(74, 31, 61, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b0f18;
    --surface: #271a24;
    --text: #f6ebf1;
    --muted: #b9a3b1;
    --border: #3a2833;
    --accent: var(--coral);
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

.wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ── header ─────────────────────────────────────────────────────────── */

header.site {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(1.4) blur(12px);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; }

nav.site { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

nav.site a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 9px;
}

nav.site a:hover { color: var(--text); background: var(--surface); }
nav.site a[aria-current="page"] { color: var(--text); font-weight: 650; }

.lang {
  font-variant: all-small-caps;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
}

/* ── hero ───────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(160deg, var(--aubergine) 0%, var(--plum) 52%, #8a3a68 100%);
  color: var(--cream);
  padding: 74px 0 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 760px; height: 760px;
  right: -290px; bottom: -420px;
  border: 62px solid rgba(255, 245, 238, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }

.hero img.icon {
  width: 96px; height: 96px;
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  margin-bottom: 26px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6.6vw, 52px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: 17em;
}

.hero p.lede {
  margin: 0 0 30px;
  font-size: clamp(17px, 2.4vw, 20px);
  color: rgba(255, 245, 238, 0.84);
  max-width: 34em;
}

.pills { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 40px; padding: 0; list-style: none; }

.pills li {
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 245, 238, 0.12);
  border: 1px solid rgba(255, 245, 238, 0.18);
}

.hero .wrap:last-child { padding-bottom: 62px; }

/* Screenshot grid: three across, wrapping to rows. Deliberately not a horizontal
   scroller -- a cut-off strip of oversized phones reads as broken. */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 22px;
  margin: 34px 0 0;
}

.shots figure { margin: 0; }

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--cream);
}

.shots figcaption {
  margin-top: 11px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .shots { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
  .shots figcaption { font-size: 13px; }
}

/* ── content ────────────────────────────────────────────────────────── */

main { padding: 56px 0 84px; }

h2 {
  font-size: clamp(23px, 3.4vw, 29px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 46px 0 14px;
  font-weight: 750;
}

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

h3 {
  font-size: 18px;
  margin: 30px 0 8px;
  font-weight: 700;
}

p { margin: 0 0 15px; }

a { color: var(--accent); text-underline-offset: 3px; }

ul, ol { margin: 0 0 16px; padding-left: 1.35em; }
li { margin-bottom: 8px; }

.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); margin: 30px 0 0; }

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin: 26px 0;
}

.card :last-child { margin-bottom: 0; }

.contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 20px;
  box-shadow: var(--shadow);
  word-break: break-all;
}

.notice {
  border-left: 4px solid var(--coral);
  background: color-mix(in srgb, var(--coral) 9%, transparent);
  border-radius: 0 14px 14px 0;
  padding: 16px 20px;
  margin: 26px 0;
}

.notice strong { color: var(--text); }

.meta { color: var(--muted); font-size: 14.5px; }

table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15.5px; }
.table-scroll { overflow-x: auto; margin: 22px -4px; padding: 0 4px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 700; font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.045em; color: var(--muted); }

/* ── footer ─────────────────────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--border);
  padding: 34px 0 56px;
  color: var(--muted);
  font-size: 14.5px;
}

footer.site .wrap { display: flex; gap: 10px 22px; flex-wrap: wrap; align-items: center; }
footer.site a { color: var(--muted); }
footer.site .spacer { margin-left: auto; }

@media (max-width: 560px) {
  .hero { padding-top: 52px; }
  main { padding: 42px 0 64px; }
  footer.site .spacer { margin-left: 0; }
}
