/* ============================================================
   Zylo AI — contact form: the modal (03) and the /contact/ page (01)
   Self-contained: the home page does not load zylo-page.css, so
   everything here carries its own tokens (same values as the site).
   ============================================================ */

:root {
  --cf-canvas:  #050607;
  --cf-surface: #0c1210;
  --cf-ink:     #eef4f1;
  --cf-soft:    #9db3aa;
  --cf-dim:     #6d7f79;
  --cf-accent:  #34d399;
  --cf-accent-ink: #04120c;
  --cf-line:    rgba(157,179,170,.16);
  --cf-line-str: rgba(157,179,170,.28);
  --cf-display: "Archivo", system-ui, sans-serif;
  --cf-text:    "Geist", system-ui, sans-serif;
  --cf-ease:    cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---------------- the form itself (shared by modal and page) ---------------- */
.cf { display: grid; gap: .95rem; font-family: var(--cf-text); }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: .95rem; }
@media (max-width: 560px) { .cf-row { grid-template-columns: 1fr; } }
.cf label { display: grid; gap: .38rem; font-size: .8rem; font-weight: 500; color: var(--cf-soft); letter-spacing: .01em; }
.cf label b { color: var(--cf-accent); font-weight: 600; }
.cf input, .cf textarea {
  width: 100%; font: inherit; font-size: .96rem; color: var(--cf-ink);
  background: rgba(255,255,255,.035); border: 1px solid var(--cf-line-str); border-radius: 9px;
  padding: .78rem .9rem; transition: border-color .2s, background .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.cf input::placeholder, .cf textarea::placeholder { color: var(--cf-dim); }
.cf input:focus, .cf textarea:focus { outline: none; border-color: var(--cf-accent); background: rgba(52,211,153,.05); box-shadow: 0 0 0 3px rgba(52,211,153,.14); }
.cf input:user-invalid, .cf textarea:user-invalid { border-color: rgba(239,107,107,.7); }
.cf textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }
.cf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; width: 100%;
  min-height: 3.2rem; padding: 0 1.6rem; border: 0; border-radius: 10px; cursor: pointer;
  font: 600 1rem var(--cf-text); color: var(--cf-accent-ink); background: var(--cf-accent);
  box-shadow: 0 18px 40px -18px rgba(52,211,153,.5); transition: background .2s, transform .14s var(--cf-ease), opacity .2s;
}
.cf-btn:hover { background: #6ee7b7; }
.cf-btn:active { transform: scale(.985); }
.cf-btn[disabled] { opacity: .6; cursor: progress; }
.cf-btn svg { width: 1.05rem; height: 1.05rem; }
.cf-note { font-size: .76rem; line-height: 1.5; color: var(--cf-dim); margin: 0; }
.cf-note a { color: var(--cf-soft); text-decoration: underline; text-underline-offset: 3px; }
.cf-note a:hover { color: var(--cf-ink); }

/* honeypot: off-screen, never for people */
.cf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* the hidden attribute must beat .cf/.cf-ok/.cf-err display:grid, or a hidden form still shows */
.cf[hidden], .cf-ok[hidden], .cf-err[hidden] { display: none !important; }

/* outcome states, swapped in by contact.js */
.cf-ok, .cf-err { display: grid; gap: .55rem; padding: 1.3rem 1.4rem; border-radius: 12px; font-family: var(--cf-text); }
.cf-ok { border: 1px solid rgba(52,211,153,.35); background: rgba(52,211,153,.08); }
.cf-err { border: 1px solid rgba(239,107,107,.4); background: rgba(239,107,107,.07); }
.cf-ok h3, .cf-err h3 { margin: 0; font: 600 1.12rem var(--cf-display); color: var(--cf-ink); }
.cf-ok p, .cf-err p { margin: 0; color: var(--cf-soft); font-size: .92rem; line-height: 1.6; }
.cf-ok p a, .cf-err p a { color: var(--cf-ink); }
.cf-again { justify-self: start; margin-top: .3rem; background: none; border: 1px solid var(--cf-line-str); color: var(--cf-soft); border-radius: 8px; padding: .55rem .9rem; font: 500 .84rem var(--cf-text); cursor: pointer; }
.cf-again:hover { color: var(--cf-ink); border-color: var(--cf-accent); }

/* ---------------- 03: the modal ---------------- */
.cd { border: 0; padding: 0; margin: auto; background: transparent; color: var(--cf-ink); width: min(34rem, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); overflow: hidden; }
/* Chromium gives a modal dialog overflow:auto, so the dialog itself never scrolls; the box does, vertically only */
.cd-box { max-height: calc(100dvh - 2rem); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.cd::backdrop { background: rgba(5,6,7,.68); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cd-box {
  position: relative; background: var(--cf-surface); border: 1px solid var(--cf-line-str); border-radius: 14px;
  padding: clamp(1.3rem, 3vw, 1.9rem); box-shadow: 0 40px 90px -30px rgba(0,0,0,.85), inset 0 1px 0 rgba(238,244,241,.06);
}
.cd-k { display: flex; align-items: center; gap: .6rem; font: 500 .66rem var(--cf-text); letter-spacing: .2em; color: var(--cf-accent); margin: 0 0 .7rem; text-transform: uppercase; }
.cd-k::before { content: ""; width: 1.4rem; height: 1px; background: var(--cf-accent); }
.cd h2 { margin: 0 0 .3rem; padding-right: 2.4rem; font: 600 clamp(1.3rem, 2.6vw, 1.6rem) var(--cf-display); line-height: 1.15; letter-spacing: -.02em; color: var(--cf-ink); text-wrap: balance; }
.cd-sub { margin: 0 0 1.25rem; color: var(--cf-soft); font-size: .92rem; line-height: 1.6; font-family: var(--cf-text); }
.cd-x {
  position: absolute; top: .95rem; right: .95rem; width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  border: 1px solid var(--cf-line); border-radius: 8px; background: transparent; color: var(--cf-soft); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.cd-x:hover { color: var(--cf-ink); border-color: var(--cf-line-str); }
.cd-x svg { width: 1rem; height: 1rem; }
.cd-x:focus-visible, .cf-btn:focus-visible, .cf-again:focus-visible { outline: 2px solid var(--cf-accent); outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .cd[open] .cd-box { animation: cd-in .32s var(--cf-ease) both; }
  @keyframes cd-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
}
/* phones: the modal becomes a full sheet */
@media (max-width: 600px) {
  .cd { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .cd-box { min-height: 100dvh; max-height: 100dvh; border-radius: 0; border-left: 0; border-right: 0; padding-top: max(1.4rem, env(safe-area-inset-top, 0px)); padding-bottom: max(1.4rem, env(safe-area-inset-bottom, 0px)); }
}
body.cd-lock { overflow: hidden; }

/* ---------------- 01: the /contact/ page ---------------- */
/* the hero carries two lede paragraphs; the first sits close to the second,
   and only the last keeps the full run-off into the buttons */
.phero .lede--tight { margin-bottom: 1.1rem; }
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.cf-panel {
  border: 1px solid var(--cf-line); border-radius: 16px; padding: clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(180deg, rgba(15,21,19,.92), rgba(8,11,10,.92));
  box-shadow: inset 0 1px 0 rgba(238,244,241,.06), 0 24px 60px -36px rgba(0,0,0,.9);
}
.cf-panel h2 { margin: 0 0 .35rem; font: 600 1.35rem var(--cf-display); color: var(--cf-ink); letter-spacing: -.01em; }
.cf-panel .cd-sub { margin-bottom: 1.4rem; }
.contact-side .spec { margin-top: 1.6rem; }
.contact-side .direct { margin-top: 1.6rem; display: grid; gap: .5rem; }
.contact-side .direct a { display: inline-flex; align-items: center; gap: .55rem; color: var(--cf-ink); text-decoration: none; font: 500 1.05rem var(--cf-display); }
.contact-side .direct a:hover { color: var(--cf-accent); }
.contact-side .direct small { color: var(--cf-dim); font-size: .8rem; }

/* ---------------- /privacy/ page prose ---------------- */
.legal { max-width: 46rem; }
.legal .prose h2 { font: 600 1.32rem var(--cf-display); color: var(--cf-ink); margin: 2.4rem 0 .7rem; letter-spacing: -.01em; }
.legal .prose h2:first-child { margin-top: 0; }
.legal .prose p, .legal .prose li { color: var(--cf-soft); }
.legal .prose li strong { color: var(--cf-ink); font-weight: 600; }
.legal .prose a { color: var(--cf-ink); text-decoration: underline; text-underline-offset: 3px; }
.legal .prose a:hover { color: var(--cf-accent); }
.legal-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cf-dim); margin: 0 0 2rem; }
.legal-meta b { color: var(--cf-soft); font-weight: 500; }
