/* casama.link (D-317). One page, plain white or dark grey, Casama's purple for text and buttons only.
   Type follows casama.ai: Google Sans, with Libre Baskerville for the wordmark and h2s. */

@font-face { font-family: "Google Sans"; src: url("/assets/fonts/GoogleSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Google Sans"; src: url("/assets/fonts/GoogleSans-Medium.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Google Sans"; src: url("/assets/fonts/GoogleSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("/assets/fonts/LibreBaskerville-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("/assets/fonts/LibreBaskerville-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #ffffff;
  --bg-2: #f4f4f6;
  --card: #f7f7f9;
  --ink: #1d1b20;
  --ink-2: #5d5a63;
  --line: #e3e2e7;
  --accent: #7a3fa8;
  --on-accent: #ffffff;
  --accent-soft: #f1e2fc;
  --good: #1f7a4d;
  --warn: #a2361f;

  --font-sans: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-display: clamp(36px, 6vw, 84px);
  --fs-h2: clamp(28px, 3.4vw, 48px);
  --fs-h3: 20px;
  --fs-lead: clamp(18px, 1.6vw, 21px);
  --fs-body: 17px;
  --fs-small: 15px;
  --gutter: clamp(16px, 3.9vw, 56px);
  --radius: 22px;
  --section: clamp(88px, 10vw, 152px);
  --header-h: 68px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1c1e; --bg-2: #2a2a2d; --card: #242427; --ink: #f2f1f4; --ink-2: #b4b1b9; --line: #38383c;
    --accent: #d9b6f7; --on-accent: #25102f; --accent-soft: #3a2a47; --good: #7fd6a6; --warn: #ffab96;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1c1c1e; --bg-2: #2a2a2d; --card: #242427; --ink: #f2f1f4; --ink-2: #b4b1b9; --line: #38383c;
  --accent: #d9b6f7; --on-accent: #25102f; --accent-soft: #3a2a47; --good: #7fd6a6; --warn: #ffab96;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--fs-body)/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
p, li { text-wrap: pretty; }
a { color: inherit; }
code { font-family: var(--font-mono); font-size: .86em; background: var(--bg-2); padding: .12em .4em; border-radius: 6px; overflow-wrap: anywhere; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: var(--gutter); top: 12px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------------------------------------------------------------- buttons, links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--bg-2); color: var(--ink);
  font: 700 var(--fs-body)/1 var(--font-sans); text-decoration: none; white-space: nowrap;
  transition: transform .14s var(--ease-out), filter .2s ease;
}
.btn.sm { min-height: 40px; padding: 0 18px; font-size: var(--fs-small); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .btn:hover { filter: brightness(1.08); } }
.text-link {
  font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .24em;
  text-decoration-color: color-mix(in oklab, var(--accent) 55%, transparent);
}
.text-link::after { content: " →"; }
@media (hover: hover) { .text-link:hover { text-decoration-color: currentColor; } }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-word { font: 700 22px/1 var(--font-serif); letter-spacing: -0.03em; }
.brand-tag { font: 700 13px/1 var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 5px 9px; border-radius: 999px; margin-left: -2px; }
[data-casama-mark] { display: block; flex: none; contain: layout paint style; opacity: 0; transition: opacity .4s ease; }
[data-casama-mark].is-ready { opacity: 1; }
[data-casama-mark] svg { display: block; }
.brand-mark { width: 34px; height: 34px; }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { font-size: var(--fs-small); font-weight: 700; text-decoration: none; padding: 8px 0; text-underline-offset: 6px; text-decoration-thickness: 2px; }
@media (hover: hover) { .site-nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); } }
@media (max-width: 760px) {
  .site-nav { display: none; }
  .header-inner > .btn { margin-left: auto; }
}

/* ---------------------------------------------------------------- hero and the address check */
.hero { padding-top: clamp(56px, 9vw, 128px); }
.eyebrow { font: 500 var(--fs-small)/1 var(--font-mono); color: var(--accent); margin-bottom: 22px; }
.hero h1 { font: 700 var(--fs-display)/1 var(--font-sans); letter-spacing: -0.05em; max-width: 15ch; }
.lead { font-size: var(--fs-lead); color: var(--ink-2); max-width: 60ch; margin-top: 28px; }
.addr { color: var(--ink); }

.check { margin-top: clamp(40px, 5vw, 64px); max-width: 760px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.check > label { display: block; font-weight: 700; margin-bottom: 14px; }
.check-row { display: flex; gap: 10px; }
.check-row input { flex: 1; min-width: 0; }
input[type="text"], textarea {
  width: 100%; min-height: 52px; padding: 14px 18px; border-radius: 16px;
  background: var(--bg); border: 1.5px solid var(--line); font-size: var(--fs-body);
  transition: border-color .15s ease;
}
input[type="text"] { font-family: var(--font-mono); font-size: 16px; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.5; }
.check-note { font-size: var(--fs-small); color: var(--ink-2); margin-top: 12px; }
.check-result { margin-top: 20px; padding: 18px 20px; border-radius: 16px; background: var(--bg); border: 1.5px solid var(--line); animation: rise .35s var(--ease-out); }
.check-result.ok { border-color: color-mix(in oklab, var(--good) 45%, var(--line)); }
.check-result.no { border-color: color-mix(in oklab, var(--warn) 45%, var(--line)); }
.check-result h3 { font-size: var(--fs-h3); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.check-result h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--good); flex: none; }
.check-result.no h3::before { background: var(--warn); }
.check-result p { color: var(--ink-2); }
.check-result p + p { margin-top: 8px; }
.check-actions { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 14px; }
.check-actions button { background: none; border: 0; padding: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .check-result { animation: none; } }
@media (max-width: 520px) {
  .check-row { flex-direction: column; }
}

/* ---------------------------------------------------------------- sections */
.section { padding-top: var(--section); }
.section h2 { font: 400 var(--fs-h2)/1.12 var(--font-serif); letter-spacing: -0.022em; max-width: 22ch; }
.section-lead { font-size: var(--fs-lead); color: var(--ink-2); max-width: 62ch; margin-top: 20px; }

/* the path: phone, Cloudflare, computer */
.flow { display: grid; grid-template-columns: 1fr 72px 1fr 72px 1fr; align-items: stretch; margin-top: 48px; }
.node { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.node strong { font-size: var(--fs-h3); }
.node span:last-child { color: var(--ink-2); font-size: var(--fs-small); }
.node-home { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.node-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.node-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wire { position: relative; display: grid; place-items: center; }
.wire::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; border-top: 2px dashed color-mix(in oklab, var(--accent) 55%, transparent); }
.wire::after { content: ""; position: absolute; right: 4px; top: calc(50% - 5px); border: 5px solid transparent; border-left: 7px solid color-mix(in oklab, var(--accent) 70%, transparent); border-right: 0; }
.wire span { position: relative; font: 500 12px/1 var(--font-mono); color: var(--accent); background: var(--bg); padding: 4px 6px; border-radius: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .wire::before { background-image: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 40% 2px; background-repeat: no-repeat; height: 2px; top: calc(50% - 2px); animation: travel 2.4s linear infinite; }
}
@keyframes travel { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.flow-aside { margin-top: 20px; color: var(--ink-2); font-size: var(--fs-small); max-width: 80ch; }
.flow-aside strong { color: var(--ink); }
.dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; border: 2px solid var(--accent); vertical-align: 0; }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; grid-template-rows: auto 56px auto 56px auto; }
  .wire::before { left: 50%; right: auto; top: 6px; bottom: 6px; border-top: 0; border-left: 2px dashed color-mix(in oklab, var(--accent) 55%, transparent); width: 0; height: auto; background: none; animation: none; }
  .wire::after { right: auto; left: calc(50% - 4px); top: auto; bottom: 4px; border: 5px solid transparent; border-top: 7px solid color-mix(in oklab, var(--accent) 70%, transparent); border-bottom: 0; }
}

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.card { display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.card h3 { font-size: var(--fs-h3); }
.card p { color: var(--ink-2); flex: 1; }
.card .text-link { align-self: flex-start; font-size: var(--fs-small); }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr; } }

/* what Casama sees */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.col { padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.col h3 { font-size: var(--fs-h3); margin-bottom: 16px; }
.ticks li, .crosses li { position: relative; padding-left: 32px; color: var(--ink-2); }
.ticks li + li, .crosses li + li { margin-top: 14px; }
.ticks li::before, .crosses li::before { position: absolute; left: 0; top: .1em; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--font-sans); }
.ticks li::before { content: "✓"; background: var(--bg-2); color: var(--ink); }
.crosses li::before { content: "✕"; background: var(--accent-soft); color: var(--accent); }
.fine { margin-top: 24px; color: var(--ink-2); font-size: var(--fs-small); max-width: 90ch; }
.fine a { font-weight: 700; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* report */
.report { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 72px); padding: clamp(24px, 4vw, 56px); border-radius: calc(var(--radius) + 6px); background: var(--card); border: 1px solid var(--line); }
.report-intro p { color: var(--ink-2); margin-top: 18px; }
.steps { margin-top: 22px; counter-reset: s; }
.steps li { position: relative; padding-left: 36px; color: var(--ink-2); counter-increment: s; }
.steps li + li { margin-top: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: .05em; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 700 13px/1 var(--font-sans); }
.steps a, .mail a { font-weight: 700; }
.mail { font-size: var(--fs-small); }
.report-form { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.report-form > label, legend { font-weight: 700; font-size: var(--fs-small); }
.report-form > label:not(:first-child), fieldset { margin-top: 12px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); font-size: var(--fs-small); font-weight: 600; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chips input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.form-error { color: var(--warn); font-size: var(--fs-small); font-weight: 600; }
.report-form .btn { align-self: flex-start; margin-top: 10px; }
.form-note { font-size: var(--fs-small); color: var(--ink-2); }
@media (max-width: 860px) { .report { grid-template-columns: 1fr; } .report-form .btn { align-self: stretch; } }

/* footer */
.site-footer { margin-top: var(--section); padding: 36px 0 44px; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--ink-2); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--ink); font-weight: 700; text-decoration: none; }
@media (hover: hover) { .site-footer a:hover { text-decoration: underline; } }

/* 404 */
.lost { padding-block: clamp(72px, 12vw, 160px); max-width: 640px; }
.lost h1 { font: 400 var(--fs-h2)/1.12 var(--font-serif); letter-spacing: -0.022em; }
.lost p { color: var(--ink-2); margin-top: 18px; font-size: var(--fs-lead); }
.lost .btn { margin-top: 32px; }
