/* aiSesor — public website. Plain CSS; build.mjs only assembles the pages.
   Palette: --brand is measured from the logo; --deep and --accent from the brand mock-up. */

:root {
  --brand: #2a757c;
  --brand-dark: #215f65;
  --brand-soft: #e2eff0;
  --deep: #163c44;
  --ink: #12323a;
  --ink-2: #3a555b;
  --muted: #5f7478;
  --paper: #ffffff;
  --paper-2: #f2f6f6;
  --card: #ffffff;
  --line: #dde7e7;
  --accent: #d9643a;
  --accent-soft: #fbe7de;
  --on-dark: #eef5f5;
  --on-dark-2: #bcd3d4;
  --radius: 18px;
  --shadow: 0 24px 60px -28px rgba(10, 34, 40, 0.55);
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--sans); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.3vw, 2.6rem); }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; }

.wrap { max-width: 1140px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--deep); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ── Brand lockup ───────────────────────────────────────────────────────── */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em;
  text-decoration: none; color: var(--deep);
}
.brand-mark { display: block; height: 30px; width: auto; }
.brand-ai { color: var(--accent); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav > a:not(.btn) { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--ink-2); }
.nav > a:not(.btn):hover { color: var(--brand); }
.nav > a[aria-current="page"] { color: var(--brand); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }

.lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.lang button {
  border: 0; background: transparent; cursor: pointer;
  font: 700 0.78rem var(--sans); letter-spacing: 0.04em;
  padding: 6px 10px; border-radius: 999px; color: var(--muted);
}
.lang button[aria-pressed="true"] { background: var(--deep); color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--deep); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px; border-radius: 12px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 12px 26px -14px rgba(217, 100, 58, 0.85);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); background: #c95629; }
.btn-brand { background: var(--brand); box-shadow: none; }
.btn-brand:hover { background: var(--brand-dark); }
.btn-small { padding: 10px 16px; font-size: 0.9rem; border-radius: 10px; }
.btn-whatsapp { gap: 10px; background: #fff; color: var(--deep); box-shadow: none; }
.btn-whatsapp:hover { background: #e9f8ef; }
.btn-whatsapp svg { width: 20px; height: 20px; fill: #1a9e4b; flex: none; }
.btn-link { gap: 8px; padding-inline: 8px; background: transparent; box-shadow: none; }
.btn-link:hover { background: transparent; text-decoration: underline; text-underline-offset: 4px; }

/* ── Hero and page headers (dark teal bands) ────────────────────────────── */
.hero, .page-hero {
  background:
    radial-gradient(circle at 85% 30%, rgba(42, 117, 124, 0.55), transparent 55%),
    linear-gradient(135deg, var(--deep) 0%, #1a4750 60%, #1f5961 100%);
  color: var(--on-dark);
}
.hero { padding-block: clamp(48px, 8vw, 96px) clamp(56px, 8vw, 100px); }
.page-hero { padding-block: clamp(44px, 7vw, 84px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1, .page-hero h1 { color: #fff; }
.page-hero h1 { max-width: 18em; font-size: clamp(2rem, 4.4vw, 3.2rem); }
.eyebrow { margin: 0 0 14px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #8fd1d4; }
.lead { margin: 22px 0 30px; max-width: 34em; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--on-dark-2); }
.page-hero .lead { margin-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.note { margin: 18px 0 0; font-size: 0.9rem; color: var(--on-dark-2); }

/* ── Phone mock-up ──────────────────────────────────────────────────────── */
.phone {
  position: relative; width: min(320px, 80vw); aspect-ratio: 9 / 19; margin-inline: auto;
  padding: 12px; border-radius: 46px; background: #0b1c20;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7), inset 0 0 0 2px #2f4c50;
}
.phone-notch {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 88px; height: 22px; border-radius: 999px; background: #0b1c20;
}
.phone-screen {
  height: 100%; overflow: hidden; border-radius: 35px;
  display: flex; flex-direction: column; gap: 9px;
  padding: 54px 14px 16px; font-size: 0.84rem;
  background: linear-gradient(180deg, #ffffff, #eef4f4);
  color: var(--ink);
}
.listening, .confirm {
  align-self: center; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; font-size: 0.74rem; font-weight: 800;
}
.listening { color: var(--brand); background: var(--brand-soft); }
.confirm { color: var(--accent); background: var(--accent-soft); letter-spacing: 0.05em; text-transform: uppercase; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.bubble { max-width: 86%; padding: 9px 12px; border-radius: 16px; line-height: 1.4; animation: rise 0.5s ease both; }
.bubble.me { align-self: flex-end; background: var(--deep); color: #fff; border-bottom-right-radius: 5px; }
.bubble.ai { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.phone-screen > :nth-child(2) { animation-delay: 0.3s; }
.phone-screen > :nth-child(3) { animation-delay: 1.1s; }
.phone-screen > :nth-child(4) { animation-delay: 1.9s; }
.phone-screen > :nth-child(5) { animation-delay: 2.7s; }
.phone-screen > :nth-child(6) { animation-delay: 3.3s; }
.mini-card {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; animation: rise 0.5s ease both;
}
.mini-img { flex: none; width: 54px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, #e7a07f, var(--brand)); }
.mini-card strong { display: block; font-size: 0.84rem; }
.mini-card span { font-size: 0.78rem; color: var(--muted); }
.phone-mic { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 12px; }
.mic-btn {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent); color: #fff; box-shadow: 0 0 0 7px var(--accent-soft);
}
.mic-btn svg { width: 22px; height: 22px; }
.wave { display: flex; align-items: center; gap: 3px; height: 24px; }
.wave i { width: 3px; height: 40%; border-radius: 2px; background: var(--brand); animation: bar 1.1s ease-in-out infinite; }
.wave i:nth-child(2) { height: 75%; animation-delay: 0.15s; }
.wave i:nth-child(3) { height: 100%; animation-delay: 0.3s; }
.wave i:nth-child(4) { height: 60%; animation-delay: 0.45s; }
.wave i:nth-child(5) { height: 30%; animation-delay: 0.6s; }
@keyframes bar { 50% { transform: scaleY(0.45); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Sections ───────────────────────────────────────────────────────────── */
section { scroll-margin-top: 76px; }
.section { padding-block: clamp(64px, 9vw, 108px); }
.section-tight { padding-block: clamp(24px, 4vw, 48px) clamp(64px, 9vw, 100px); }
.alt { background: var(--paper-2); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { margin: 16px 0 0; font-size: 1.1rem; color: var(--ink-2); }

.grid-3, .privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  box-shadow: 0 1px 2px rgba(18, 50, 58, 0.04);
}
.card p { margin: 10px 0 0; font-size: 0.98rem; color: var(--ink-2); }
.icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
  border-radius: 12px; background: var(--brand-soft); color: var(--brand);
}
.icon svg { width: 22px; height: 22px; }

/* Home: one card per section page. */
.card-link {
  display: flex; flex-direction: column; color: inherit; text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.card-link:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 18px 40px -26px rgba(10, 34, 40, 0.5); }
.more { margin-top: auto; padding-top: 16px; font-weight: 700; color: var(--brand); }

/* Section pages: link on to the next one. */
.next { margin: 48px 0 0; }
.next a { font-weight: 700; color: var(--brand); text-decoration: none; }
.next a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── Apps ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; margin-bottom: 18px; padding: 6px 12px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.langs { margin: 0; font-weight: 700; color: var(--on-dark); }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.examples { display: grid; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.examples li { font-weight: 700; color: #b4502b; }

/* ── Diagram and steps ──────────────────────────────────────────────────── */
.diagram { display: grid; grid-template-columns: 1fr auto 0.8fr auto 1fr; align-items: center; gap: 16px; margin-bottom: 64px; }
.node { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.node h3 { font-size: 1.02rem; }
.node ul { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.node li { padding: 8px 12px; border-radius: 10px; background: var(--paper-2); font-size: 0.93rem; font-weight: 600; }
.node.core {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding-block: 28px;
  text-align: center; background: var(--deep); border-color: var(--deep); color: var(--on-dark);
}
.core-mark { height: 46px; width: auto; }
.node.core .brand { color: #fff; font-size: 1.7rem; }
.node.core p { margin: 0; color: var(--on-dark-2); font-weight: 600; }
.arrow { width: 48px; color: var(--brand); }

.steps-title { margin-bottom: 20px; font-size: 1.45rem; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px;
  border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800;
}
.steps h3 { font-size: 1.02rem; }
.steps p { margin: 6px 0 0; font-size: 0.94rem; color: var(--ink-2); }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { max-width: 820px; }
details { padding: 18px 0; border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; font-size: 1.06rem; font-weight: 700; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 1.5rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; color: var(--ink-2); }

/* ── Closing and footer ─────────────────────────────────────────────────── */
.closing {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(32px, 6vw, 60px); border-radius: 24px; color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, #226a70 100%);
}
.closing h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); max-width: 18em; }
.closing p { margin: 12px 0 0; max-width: 34em; color: #dcefef; }
.closing p a, .site-footer a { color: #fff; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap; }

.site-footer { padding-block: 44px; background: var(--deep); color: var(--on-dark-2); font-size: 0.92rem; }
.site-footer p { margin: 0; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: start; }
.site-footer .brand { color: #fff; font-weight: 800; text-decoration: none; }
.site-footer .footer-brand p { margin: 10px 0 0; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; padding-top: 6px; }
.site-footer .footer-nav a { font-weight: 600; text-decoration: none; color: var(--on-dark-2); }
.site-footer .footer-nav a:hover, .site-footer .footer-nav a[aria-current="page"] { color: #fff; }
.footer-contact { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.site-footer .copy { white-space: nowrap; }

/* ── Access request form ────────────────────────────────────────────────── */
.steps a { color: var(--brand); font-weight: 700; }
.request-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.request-form { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: clamp(22px, 3vw, 34px); }
.field { display: grid; gap: 6px; font-size: 0.93rem; font-weight: 700; }
.field-wide, .request-form .btn, .form-note, .form-msg { grid-column: 1 / -1; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font: 500 1rem var(--sans);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.request-form .btn { justify-self: start; border: 0; cursor: pointer; font: 700 1rem var(--sans); }
.request-form .btn:disabled { opacity: 0.7; cursor: progress; transform: none; }
.when-busy { display: none; }
.request-form[aria-busy="true"] .when-idle { display: none; }
.request-form[aria-busy="true"] .when-busy { display: inline; }
.form-note { margin: 0; font-size: 0.88rem; color: var(--muted); }
/* Shown by site.js, or by the #anchor the app redirects to when JavaScript is off. */
.form-msg { display: none; margin: 0; padding: 14px 16px; border-radius: 12px; font-weight: 600; }
.form-msg.show, .form-msg:target { display: block; }
.form-msg.ok { background: var(--brand-soft); color: var(--deep); }
.form-msg.fail { background: var(--accent-soft); color: #8a3517; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.request-aside h2 { font-size: 1.35rem; }
.next-steps { display: grid; gap: 10px; margin: 16px 0 28px; padding-left: 1.3em; font-weight: 600; color: var(--ink-2); }
.wa-card { background: var(--deep); border-color: var(--deep); color: var(--on-dark); }
.wa-card h3 { color: #fff; }
.wa-card p { margin: 8px 0 18px; color: var(--on-dark-2); }
@media (max-width: 980px) { .request-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .request-form { grid-template-columns: 1fr; } }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .privacy-grid, .steps { grid-template-columns: 1fr 1fr; }
  .diagram { grid-template-columns: 1fr; }
  .arrow { justify-self: center; transform: rotate(90deg); }
}
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px clamp(16px, 4vw, 32px) 20px; background: #fff; border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav > a:not(.btn) { padding: 10px 0; font-size: 1.05rem; }
  .lang { align-self: flex-start; margin: 8px 0; }
  .nav .btn { margin-top: 6px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand { font-size: 1.35rem; }
  .brand-mark { height: 26px; }
  .grid-3, .privacy-grid, .steps, .feature-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
