/* fieldia.dev — the site around the forms. The forms bring their own styles. */
:root {
  --ink: #1b1f24;
  --muted: #5b6470;
  --page: #f6f7f9;
  --surface: #ffffff;
  --line: #e3e6ea;
  --brand: #002855;
  --link: #0b5cad;
  --code-bg: #f1f3f6;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.6 var(--font); }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---- top bar ---- */
.top { display: flex; align-items: center; gap: 24px; padding: 0 max(16px, calc((100% - 1160px) / 2)); height: 60px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.mark { width: 26px; height: 26px; border-radius: 6px; background: var(--brand) url("/favicon.svg") center / cover; }
.top-nav { display: flex; gap: 20px; margin-inline-start: auto; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--ink); }

/* ---- front page ---- */
main#main { display: block; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: start; padding: 56px max(16px, calc((100% - 1160px) / 2)) 40px; }
.hero-text h1 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 18px; }
.lead { font-size: 18.5px; color: #3c434c; margin: 0 0 22px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.button.primary:hover { background: #003a7a; color: #fff; }
.hero-live { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 14px; box-shadow: 0 10px 30px rgba(16, 24, 40, 0.07); min-width: 0; }
.live-bar { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--muted); padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.live-bar select { font: inherit; color: var(--ink); margin-inline-start: 6px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.live-form .fd-form { --fd-page: transparent; }
.live-note { min-height: 1.4em; margin: 10px 0 0; font-size: 13.5px; color: #1f6f3a; }
.band { padding: 36px max(16px, calc((100% - 1160px) / 2)); border-top: 1px solid var(--line); }
.band h2 { font-size: 26px; letter-spacing: -0.01em; margin: 0 0 12px; }
.band > p { max-width: 760px; color: #3c434c; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: #3c434c; }
.features strong { display: block; color: var(--ink); margin-bottom: 4px; }
.rules { max-width: 820px; padding-inline-start: 22px; color: #3c434c; }
.rules li { margin-bottom: 8px; }
.rules strong { color: var(--ink); }

/* ---- docs ---- */
.docs { display: grid; grid-template-columns: 200px minmax(0, 760px); gap: 48px; padding: 40px max(16px, calc((100% - 1160px) / 2)) 56px; }
.docs-wide { grid-template-columns: 200px minmax(0, 1fr); }
.side { position: sticky; top: 84px; align-self: start; display: grid; gap: 2px; }
.side a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: 15px; }
.side a:hover { color: var(--ink); background: var(--surface); }
.side a[aria-current="page"] { color: var(--brand); background: var(--surface); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.prose { min-width: 0; }
.prose h1 { font-size: 36px; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 14px; }
.prose h2 { font-size: 23px; letter-spacing: -0.01em; margin: 40px 0 10px; }
.prose p, .prose li { color: #353c45; }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 6px; }
.code { background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.55 var(--mono); margin: 14px 0 18px; }
.code code { background: none; padding: 0; font-size: inherit; }
table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { text-align: start; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: #fafbfc; }
tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }
.fields td:first-child { white-space: nowrap; }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.demo-card h2 { font-size: 19px; margin: 0 0 6px; }
.demo-card p { margin: 0 0 8px; font-size: 15px; }
.demo-card ul { margin: 0; padding-inline-start: 18px; font-size: 15px; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 22px max(16px, calc((100% - 1160px) / 2)); color: var(--muted); font-size: 14px; }
.foot p { margin: 4px 0; }

/* ---- narrow screens ---- */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .docs, .docs-wide { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; }
  .side { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .side a { background: var(--surface); border: 1px solid var(--line); padding: 4px 10px; font-size: 14px; }
  .side a[aria-current="page"] { box-shadow: none; border-color: var(--brand); }
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .top { gap: 12px; }
  .top-nav { gap: 14px; }
}
