/* ZUFI LTD — minimal design system
   Edit the tokens below to restyle the entire site. */

:root {
  --bg:            #ffffff;
  --bg-subtle:     #fafafa;
  --bg-raised:     #ffffff;
  --text:          #16161a;
  --text-muted:    #6b6b76;
  --text-faint:    #9a9aa4;
  --line:          #e8e8ec;
  --line-strong:   #d6d6dc;
  --accent:        #2b4de0;
  --accent-soft:   #eef1fe;
  --danger:        #c0392b;
  --success:       #1b7f4c;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 42rem;   /* reading width for legal pages */
  --wide:    64rem;   /* page shell width */
  --radius:  10px;
  --gutter:  16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0c0c0e;
    --bg-subtle:   #121215;
    --bg-raised:   #151519;
    --text:        #ececf0;
    --text-muted:  #9c9ca8;
    --text-faint:  #6e6e7a;
    --line:        #24242a;
    --line-strong: #33333b;
    --accent:      #8fa4ff;
    --accent-soft: #1a1e33;
    --danger:      #ff7a6b;
    --success:     #5fd39a;
  }
}

:root[data-theme="dark"] {
  --bg:          #0c0c0e;
  --bg-subtle:   #121215;
  --bg-raised:   #151519;
  --text:        #ececf0;
  --text-muted:  #9c9ca8;
  --text-faint:  #6e6e7a;
  --line:        #24242a;
  --line-strong: #33333b;
  --accent:      #8fa4ff;
  --accent-soft: #1a1e33;
  --danger:      #ff7a6b;
  --success:     #5fd39a;
}

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 3rem 0;
}

/* ---------- layout ---------- */

.shell {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: .6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */

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

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1rem;
}
.brand:hover { text-decoration: none; opacity: .75; }
.brand__mark {
  width: 24px; height: 24px;
  flex: 0 0 24px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.brand__suffix { color: var(--text-faint); font-weight: 400; }

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.nav a {
  color: var(--text-muted);
  font-size: .9rem;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); font-weight: 500; }

.theme-toggle {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: border-color .15s ease, color .15s ease;
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--text); }
.theme-toggle svg { width: 15px; height: 15px; }
:root[data-theme="dark"] .theme-toggle .icon-sun,
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon,
:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: none; }
}

.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav {
    position: fixed;
    inset: 62px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
    transform: translateY(-120%);
    transition: transform .22s ease;
    box-shadow: 0 18px 40px -24px rgba(0,0,0,.4);
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav a {
    padding: .75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .nav a:last-of-type { border-bottom: 0; }
  .nav-toggle {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }
  .header-actions { display: flex; align-items: center; gap: .5rem; }
}

@media (min-width: 721px) {
  .header-actions { display: flex; align-items: center; gap: 1.4rem; }
}

/* ---------- type ---------- */

h1, h2, h3, h4 {
  line-height: 1.22;
  letter-spacing: -0.021em;
  font-weight: 600;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.55rem); margin-top: 2.75em; }
h3 { font-size: 1.05rem; margin-top: 2em; }

p { margin: 0 0 1.15em; }

.eyebrow {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.2rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 34rem;
}

.small { font-size: .875rem; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.mono { font-family: var(--mono); font-size: .9em; }

/* ---------- hero ---------- */

.hero {
  padding: clamp(4rem, 12vw, 7.5rem) 0 clamp(3rem, 8vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}
.hero h1 { max-width: 18ch; }
.hero .lede { margin-top: 1.4rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  font-size: .925rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { opacity: .84; text-decoration: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--bg-subtle); opacity: 1; }

/* ---------- sections ---------- */

.section { padding: clamp(3.5rem, 9vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { margin-bottom: 2.5rem; max-width: 40rem; }
.section__head h2 { margin-top: 0; }

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--bg-raised);
}
.card h3 { margin-top: 0; margin-bottom: .45rem; font-size: 1rem; }
.card p:last-child { margin-bottom: 0; }
.card--link { transition: border-color .15s ease, transform .15s ease; }
a.card--link { color: inherit; display: block; }
a.card--link:hover { border-color: var(--line-strong); text-decoration: none; transform: translateY(-1px); }

.card__arrow {
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--accent);
  display: inline-block;
}

/* app tiles */
.app-tile {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  background: var(--bg-raised);
}
.app-tile__icon {
  width: 56px; height: 56px;
  flex: 0 0 56px;
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-weight: 600;
  font-size: 1.1rem;
}
.app-tile h3 { margin: 0 0 .3rem; font-size: 1rem; }
.app-tile p { margin: 0 0 .75rem; font-size: .9rem; color: var(--text-muted); }

.store-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.store-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  padding: .35rem .7rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text-muted);
}
.store-link:hover { color: var(--text); border-color: var(--text-muted); text-decoration: none; }
.store-link[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ---------- legal / prose pages ---------- */

.page-head {
  padding: clamp(3rem, 8vw, 4.5rem) 0 2rem;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: .5rem; }

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
  font-size: .85rem;
  color: var(--text-faint);
}

.prose {
  max-width: var(--measure);
  padding: 3rem 0 4rem;
}
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.15em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--text-faint); }
.prose strong { font-weight: 600; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: .9rem;
}
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--line);
}
.prose th {
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom-color: var(--line-strong);
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.25rem;
  margin: 2rem 0;
  font-size: .925rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: .3rem; }

/* table of contents */
.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 3rem;
  background: var(--bg-subtle);
}
.toc h2 {
  margin: 0 0 .75rem;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}
.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  font-size: .9rem;
  columns: 2;
  column-gap: 2rem;
}
.toc li { margin-bottom: .35em; break-inside: avoid; }
.toc a { color: var(--text-muted); }
.toc a:hover { color: var(--accent); }
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* ---------- forms ---------- */

.form { max-width: 34rem; }
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: .4rem;
}
.field .hint { font-size: .8rem; color: var(--text-faint); margin: .35rem 0 0; }

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: .7rem .85rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23888' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.2rem;
}

.checkbox {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.checkbox input { margin-top: .25rem; accent-color: var(--accent); flex: 0 0 auto; }

/* honeypot */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-status {
  margin-top: 1rem;
  font-size: .9rem;
  padding: .8rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: none;
}
.form-status[data-state="ok"]      { display: block; color: var(--success); border-color: var(--success); background: var(--bg-subtle); }
.form-status[data-state="error"]   { display: block; color: var(--danger);  border-color: var(--danger);  background: var(--bg-subtle); }
.form-status[data-state="working"] { display: block; color: var(--text-muted); }

/* ---------- contact details ---------- */

.split {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  padding: 3rem 0 4rem;
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.detail-list { margin: 0; }
.detail-list dt {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: .3rem;
}
.detail-list dd {
  margin: 0 0 1.6rem;
  font-size: .95rem;
  line-height: 1.6;
}
.detail-list dd:last-child { margin-bottom: 0; }

address { font-style: normal; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-subtle);
  padding: 3.5rem 0 2.5rem;
  font-size: .875rem;
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  margin-bottom: 3rem;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
.footer-col h3 {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 .9rem;
  font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .55rem; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--text); text-decoration: none; }

.footer-legal {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: .8rem;
  color: var(--text-faint);
  line-height: 1.6;
}
.footer-legal p { margin: 0; max-width: 46ch; }

/* ---------- 404 ---------- */

.centered {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 4rem 0;
}
.centered .actions { justify-content: center; }

/* ---------- print ---------- */

@media print {
  .site-header, .site-footer, .theme-toggle, .nav-toggle, .toc { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .prose { max-width: none; padding: 0; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
