/* hjem.family, in Familio's design (familio-ios/Design/brand.html): warm paper, ink, the system's rounded face,
   soft corners, the family colours as stickers. No web fonts, no third-party requests. */
:root {
  --paper: #fbf9f6; --paper-2: #f3efe9; --card: #ffffff; --ink: #2e2c2a; --ink-2: #6f6a64; --line: #e8e2da;
  --teal: #0f96a6; --coral: #f2603f; --amber: #e0950c; --green: #22a95a; --indigo: #6159e8; --pink: #f0579a; --blue: #2f8dff;
  --shadow: 0 1px 0 rgba(46,44,42,.04), 0 22px 44px -26px rgba(46,44,42,.30);
  --round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.19, 1, .22, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #1d1a17; --paper-2: #2b2723; --card: #2a2622; --ink: #f6f1ea; --ink-2: #b3aa9f; --line: #3a3530;
    --teal: #3cc6d4; --shadow: 0 22px 44px -26px rgba(0,0,0,.75); color-scheme: dark; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: var(--round); font-weight: 500; font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) max(18px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(18px, env(safe-area-inset-left)); }
main { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 96px; padding-bottom: 40px; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.04; }
h3 { font-size: 21px; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: inherit; }
a:focus-visible, summary:focus-visible, .btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ---------- header ---------- */
.top { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -0.02em; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { text-decoration: none; font-weight: 700; color: var(--ink-2); }
.top nav a:hover { color: var(--ink); }
.pill { font-weight: 800; font-size: 14px; padding: 9px 15px; border-radius: 999px; }
.soon { background: var(--ink); color: var(--paper); white-space: nowrap; }
@media (max-width: 760px) { .top nav { display: none; } .top .soon { margin-left: auto; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 800; font-size: 17px; border: 0; border-radius: 999px;
  padding: 15px 24px; text-decoration: none; cursor: pointer; transition: transform .12s ease; }
.btn:active { transform: scale(.96); }
.btn.dark { background: var(--ink); color: var(--paper); }
.btn.soft { background: var(--paper-2); color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--card); border-radius: 44px; box-shadow: var(--shadow);
  padding: clamp(64px, 10vw, 120px) 24px clamp(64px, 10vw, 120px); text-align: center; display: grid; justify-items: center; gap: 20px; margin-top: 8px; }
.hero h1 { font-size: clamp(46px, 8.4vw, 96px); line-height: .96; letter-spacing: -0.05em; max-width: 11ch; position: relative; z-index: 1; }
.hero .lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-2); max-width: 34ch; position: relative; z-index: 1; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 1; margin-top: 6px; }
.trial { color: var(--ink-2); font-size: 15px; font-weight: 600; position: relative; z-index: 1; }
.sticker { position: absolute; width: clamp(54px, 7vw, 92px); height: auto; filter: drop-shadow(0 10px 12px rgba(46,44,42,.16));
  transform: rotate(var(--r, 0deg)); animation: bob 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.sticker.inline { position: static; width: 84px; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@media (max-width: 760px) { .sticker.far { display: none; } .sticker { width: 48px; } }

/* ---------- inside ---------- */
.inside, .promises, .faq, .final { display: grid; gap: 18px; }
.section-lead { font-size: 19px; color: var(--ink-2); max-width: 56ch; }
.features { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.feature { background: var(--card); border-radius: 32px; box-shadow: var(--shadow); padding: 26px; display: grid; gap: 22px; align-content: space-between;
  grid-column: span 2; min-width: 0; }
.feature.chat, .feature.photos { grid-column: span 3; }
.feature .copy { display: grid; gap: 8px; }
.feature p { color: var(--ink-2); }
@media (max-width: 900px) { .features { grid-template-columns: minmax(0, 1fr); } .feature, .feature.chat, .feature.photos { grid-column: auto; } }

.demo { background: var(--paper); border-radius: 22px; padding: 16px; display: grid; gap: 8px; font-size: 15px; }
.av { width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); color: #fff; display: inline-grid; place-items: center;
  font-weight: 800; font-size: calc(var(--s) * .42); flex: none; box-shadow: 0 0 0 2px var(--card); }
.demo.chat .msg { display: flex; gap: 8px; align-items: flex-end; }
.bubble { background: var(--card); padding: 9px 14px; border-radius: 20px; font-weight: 600; max-width: 85%; }
.bubble.me { background: var(--teal); color: #fff; justify-self: end; }
.demo.chat .photo { width: 150px; height: 112px; border-radius: 20px; position: relative;
  background: radial-gradient(circle at 30% 40%, #9b5de5 0 12%, transparent 13%), radial-gradient(circle at 65% 55%, #00bbf9 0 12%, transparent 13%),
    radial-gradient(circle at 48% 72%, #fee440 0 10%, transparent 11%), linear-gradient(#f3eee6, #e2d9cc); }
.demo.chat .photo span { position: absolute; right: -6px; bottom: -8px; background: var(--card); border-radius: 999px; padding: 2px 8px; font-size: 13px; font-weight: 700; box-shadow: 0 0 0 2px var(--paper); }
.demo.photos b { font-weight: 800; }
.demo.photos .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.demo.photos i { aspect-ratio: 1; border-radius: 12px; background: var(--g); }
.demo.calendar .ev { display: flex; justify-content: space-between; gap: 10px; background: var(--card); border-radius: 16px; padding: 11px 14px;
  border-left: 5px solid var(--c); font-variant-numeric: tabular-nums; }
.demo.calendar .ev span { color: var(--ink-2); font-weight: 700; }
.demo.map .land { position: relative; height: 130px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(circle at 70% 30%, #cfe6c4 0 18%, transparent 19%), linear-gradient(115deg, transparent 0 58%, #a9d7e6 58% 70%, transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 34px, #fff 34px 38px), repeating-linear-gradient(90deg, transparent 0 46px, #fff 46px 50px), #f1efe8; }
.demo.map .pin { position: absolute; display: flex; filter: drop-shadow(0 4px 6px rgba(0,0,0,.2)); }
.demo.map .pin .av { box-shadow: 0 0 0 3px #fff; }
.demo.map .pin.pair .av + .av { margin-left: -8px; }
.demo.map .who { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 8px 12px; }
.demo.map .who span { color: var(--ink-2); margin-left: auto; font-size: 14px; }
.demo.inbox .addr { background: var(--teal); color: #fff; font-weight: 800; border-radius: 16px; padding: 12px 14px; }
.demo.inbox .mail { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 16px; padding: 11px 14px; }
.demo.inbox .mail div { display: grid; }
.demo.inbox .mail span { color: var(--ink-2); font-size: 14px; }
.demo.inbox .add { justify-self: start; background: var(--ink); color: var(--paper); font-weight: 800; border-radius: 999px; padding: 8px 14px; font-size: 14px; }

/* ---------- promises ---------- */
.promise-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 10px; }
.promise { background: var(--card); border-radius: 28px; box-shadow: var(--shadow); padding: 26px; display: grid; gap: 8px; align-content: start; }
.promise p { color: var(--ink-2); }
@media (max-width: 860px) { .promise-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- price ---------- */
.price-card { background: var(--ink); color: var(--paper); border-radius: 44px; padding: clamp(36px, 6vw, 64px); display: grid; gap: 12px; justify-items: center; text-align: center; }
.price-card h2 { max-width: 16ch; }
.amount { font-size: clamp(56px, 9vw, 92px); font-weight: 900; letter-spacing: -0.04em; line-height: 1; margin-top: 10px; }
.once { opacity: .75; font-weight: 700; }
.price-card ul { list-style: none; padding: 0; margin: 14px 0 6px; display: grid; gap: 10px; text-align: left; }
.price-card li { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.price-card li svg { color: #3cc6d4; flex: none; }
.price-card .note { opacity: .75; max-width: 46ch; font-size: 15px; }

/* ---------- faq ---------- */
.faq details { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 18px; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--ink-2); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: 18px; max-width: 64ch; }

/* ---------- final ---------- */
.final { justify-items: center; text-align: center; padding: 20px 0; }
.final p { color: var(--ink-2); font-size: 19px; }

/* ---------- documents (support, privacy, 404) ---------- */
.doc { max-width: 720px; display: grid; gap: 16px; padding-top: 24px; }
.doc.center { justify-items: center; text-align: center; margin: 0 auto; padding: 12vh 0; }
.doc h1 { font-size: clamp(42px, 7vw, 64px); line-height: 1; letter-spacing: -0.045em; }
.doc h2 { font-size: 24px; margin-top: 18px; }
.doc p { color: var(--ink-2); max-width: 64ch; }
.doc .lead { font-size: 19px; }
.doc .updated { font-weight: 700; }
.doc .faq { display: grid; gap: 10px; margin-top: 8px; }
.doc a { color: var(--teal); font-weight: 700; }

/* ---------- footer (layout B) ---------- */
.foot { max-width: 1080px; margin: 40px auto 0; padding: 32px 0 40px; display: flex; justify-content: space-between; gap: 24px; color: var(--ink-2); font-size: 15px; }
.foot-left { display: grid; gap: 6px; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink-2); text-decoration: none; }
.foot-brand img { filter: grayscale(1); opacity: .5; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); transition: filter .2s, opacity .2s; }
.foot-brand:hover img { filter: none; opacity: 1; }
.foot-left a:not(.foot-brand) { text-decoration: none; }
.foot-left a:not(.foot-brand):hover, .foot-left a:not(.foot-brand):focus-visible { text-decoration: underline; color: var(--ink); }
.foot-right { display: grid; justify-items: end; gap: 10px; align-content: start; }
.foot-right nav { display: flex; gap: 18px; }
.foot-right nav a { text-decoration: none; font-weight: 700; }
.foot-right nav a:hover { color: var(--ink); }
.language { position: relative; }
.language summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: var(--paper-2); }
.language summary::-webkit-details-marker { display: none; }
.language ul { position: absolute; right: 0; bottom: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; background: var(--card); border-radius: 18px;
  box-shadow: var(--shadow), 0 0 0 1px var(--line); min-width: 170px; z-index: 5; }
.language li a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.language li a:hover { background: var(--paper-2); }
@media (max-width: 760px) { .foot { flex-direction: column; } .foot-right { justify-items: start; } .language ul { left: 0; right: auto; } }

/* ---------- invite page (rendered by the Worker) ---------- */
.invite { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 40px; align-items: start; padding: 20px 0 40px; }
.invite .intro { display: grid; gap: 14px; }
.invite h1 { font-size: clamp(44px, 8vw, 76px); line-height: .98; letter-spacing: -0.05em; }
.invite .lead { color: var(--ink-2); font-size: 19px; max-width: 40ch; }
.codecard { background: var(--card); border-radius: 36px; box-shadow: var(--shadow); padding: 28px 24px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.codecard .label { font-weight: 800; font-size: 14px; color: var(--teal); }
.codecard .code { font-size: clamp(36px, 11vw, 60px); font-weight: 900; letter-spacing: .05em; white-space: nowrap; font-variant-numeric: tabular-nums; user-select: all; }
.codecard .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
.howto { background: var(--card); border-radius: 28px; box-shadow: var(--shadow); padding: 22px 24px; display: grid; gap: 10px; }
.howto ol { margin: 0; padding-left: 22px; color: var(--ink-2); display: grid; gap: 4px; }
.howto .soon-note { color: var(--ink-2); font-size: 15px; }
.qr { background: var(--card); border-radius: 32px; box-shadow: var(--shadow); padding: 24px; display: grid; gap: 12px; justify-items: center; text-align: center; width: 280px; }
.qr svg { width: 200px; height: 200px; }
.qr svg path { fill: var(--ink); }
.qr p { color: var(--ink-2); font-weight: 700; font-size: 15px; }
.invite .side { display: grid; gap: 16px; }
@media (max-width: 860px), (pointer: coarse) { .invite { grid-template-columns: minmax(0, 1fr); } .qr { display: none; } }
