/* IzuTech 2026
   Layout: one calm left-aligned reading column on a wide frame; the Pyrenees ridge from the logo
   closes the hero; offers read like line items on a quote, price aligned right. */

:root {
  --paper: #f5f7fa;      /* snow, slightly blue */
  --surface: #ffffff;
  --tint: #ebeff6;       /* alternate section ground */
  --ink: #1d2348;        /* deep navy text */
  --muted: #545c7a;
  --line: #d6dcea;
  --brand: #34407c;      /* logo navy */
  --on-brand: #ffffff;
  --glacier: #2b9fd8;    /* the three dots in the logo */
  --ridge-back: #c9d2e6;
  --error: #b3261e;

  --font-display: "Alegreya", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.5rem);
  --step-4: clamp(2.4rem, 1.6rem + 4vw, 4.1rem);

  --radius: 6px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1328; --surface: #161b36; --tint: #131833; --ink: #e7eaf6; --muted: #a2a9c6;
    --line: #2a3156; --brand: #a9b5f5; --on-brand: #0f1328; --glacier: #5cc4f0; --ridge-back: #262d52; --error: #ff8a80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1328; --surface: #161b36; --tint: #131833; --ink: #e7eaf6; --muted: #a2a9c6;
  --line: #2a3156; --brand: #a9b5f5; --on-brand: #0f1328; --glacier: #5cc4f0; --ridge-back: #262d52; --error: #ff8a80;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--glacier); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); letter-spacing: -0.01em; max-width: 16ch; }
h2 { font-size: var(--step-3); max-width: 24ch; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 20; }
.skip:focus { left: 0.5rem; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 1.5rem; padding-block: 0.75rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.98rem; }
.nav a:hover { color: var(--brand); text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.lang {
  font: inherit; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em;
  background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.35rem 0.6rem; cursor: pointer; min-width: 2.75rem;
}
.lang:hover { border-color: var(--brand); }

@media (max-width: 860px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 420px) {
  .brand span { display: none; }
}

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; text-align: center;
  background: var(--brand); color: var(--on-brand); border: 2px solid var(--brand);
  border-radius: var(--radius); padding: 0.8rem 1.3rem; line-height: 1.2; cursor: pointer; font: inherit; font-weight: 700;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-small { padding: 0.45rem 0.85rem; font-size: 0.95rem; }
.btn-ghost { background: transparent; color: var(--brand); }
.link-quiet { color: var(--ink); font-weight: 700; }

/* Hero */
.hero { position: relative; padding-top: clamp(3rem, 8vw, 6rem); overflow: hidden; }
.hero .wrap { display: grid; gap: 1.4rem; padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.hero-kicker { color: var(--muted); font-size: 1rem; }
.hero-lead { font-size: var(--step-1); max-width: 38em; color: var(--ink); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 0.4rem; }
.hero-note { color: var(--muted); font-size: 0.95rem; }

.ridge { display: block; width: 100%; height: clamp(90px, 14vw, 180px); }
.ridge path { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ridge-back { stroke: var(--ridge-back); stroke-width: 2; }
.ridge-front { stroke: var(--brand); stroke-width: 2.5; stroke-dasharray: 2600; stroke-dashoffset: 0; }
.ridge-dot { fill: var(--glacier); }
@media (prefers-reduced-motion: no-preference) {
  .ridge-front { animation: draw 2.2s ease-out both; }
  .ridge-dot { animation: appear 0.6s ease-out 1.6s both; }
}
@keyframes draw { from { stroke-dashoffset: 2600; } to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-tint { background: var(--tint); }
.section .wrap > h2 + * { margin-top: 1rem; }
.section-lead { max-width: 40em; color: var(--muted); font-size: 1.1rem; }

/* Sectors: a definition list */
.sectors { margin: 2.25rem 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.sectors > div { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 0.4rem 2rem; padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.sectors dt { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.sectors dd { margin: 0; max-width: 40em; }
@media (max-width: 640px) { .sectors > div { grid-template-columns: 1fr; } }

/* Offers: line items on a quote */
.offers { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; gap: 1rem; }
.offer {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2.5rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.9rem);
}
.offer-body { display: grid; gap: 0.6rem; min-width: 0; max-width: 42em; }
.offer-example { color: var(--muted); font-size: 0.98rem; }
.offer-example > span:first-child { font-weight: 700; color: var(--ink); }
.price { text-align: right; white-space: nowrap; color: var(--muted); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.price strong { display: block; font-family: var(--font-display); font-size: var(--step-2); color: var(--ink); }
.offers-foot { margin-top: 1.5rem; max-width: 42em; }
@media (max-width: 640px) {
  .offer { grid-template-columns: 1fr; }
  .price { text-align: left; order: -1; }
  .price strong { display: inline; margin-left: 0.25rem; }
}

/* Workshop */
.workshop-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.workshop-grid > div:first-child { display: grid; gap: 1rem; }
.workshop-grid > div:first-child p:not(.tag) { max-width: 36em; }
.tag { justify-self: start; font-size: 0.85rem; font-weight: 700; color: var(--on-brand); background: var(--brand); border-radius: 999px; padding: 0.15rem 0.7rem; }
.workshop-card { border: 2px solid var(--brand); border-radius: var(--radius); background: var(--surface); padding: 1.5rem; display: grid; gap: 1.25rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.facts li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; }
.facts li > span:first-child { color: var(--muted); }
.facts strong { font-family: var(--font-display); font-size: 1.3rem; }
@media (max-width: 760px) { .workshop-grid { grid-template-columns: 1fr; } }

/* Method: a real sequence, so numbered */
.steps { list-style: none; margin: 2.25rem 0 0; padding: 0; counter-reset: step; display: grid; gap: 0; max-width: 46rem; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.75rem 3.25rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; color: var(--brand);
  border: 2px solid var(--brand); border-radius: 50%; background: var(--tint);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 1.03rem; top: 2.2rem; bottom: 0.2rem; width: 2px; background: var(--line); }
.steps h3 { margin-bottom: 0.3rem; }
.steps p { color: var(--muted); }

/* Doubts */
.doubts { margin-top: 2.25rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.doubts figure { margin: 0; display: grid; gap: 0.5rem; }
.doubts blockquote { margin: 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; line-height: 1.3; }
.doubts figcaption { color: var(--muted); }
@media (max-width: 700px) { .doubts { grid-template-columns: 1fr; } }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: clamp(1.75rem, 5vw, 4rem); align-items: start; }
.portrait { margin: 0; display: grid; gap: 0.75rem; max-width: 16rem; }
.portrait img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 4px solid var(--surface); box-shadow: 0 0 0 2px var(--brand); }
.portrait figcaption { display: grid; gap: 0.1rem; text-align: center; color: var(--muted); font-size: 0.95rem; }
.portrait figcaption strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.about-text { display: grid; gap: 1rem; max-width: 40em; }
.about-text h2 { margin-bottom: 0.25rem; }
@media (max-width: 700px) { .about { grid-template-columns: 1fr; } .portrait { max-width: 12rem; } }
.about-aside { padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); }

/* FAQ */
.faq { margin-top: 2rem; max-width: 46rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding-block: 1rem; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 1.4rem; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 1.1rem; max-width: 40em; color: var(--muted); }

/* Contact */
.contact { border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.contact-grid > div { display: grid; gap: 1rem; }
.contact-mail { color: var(--muted); }
.form { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 1.75rem); }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 700; font-size: 0.98rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.65rem 0.75rem; width: 100%;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--glacier); outline-offset: 1px; border-color: var(--brand); }
.field [aria-invalid="true"] { border-color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { min-height: 1.5em; font-size: 0.98rem; }
.form-status.ok { color: var(--ink); font-weight: 700; }
.form-status.err { color: var(--error); }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* Footer */
.site-footer { background: var(--tint); border-top: 1px solid var(--line); padding-top: 2.5rem; font-size: 0.98rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-grid > div { display: grid; gap: 0.35rem; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-base { padding-block: 1.5rem; color: var(--muted); font-size: 0.9rem; }

/* Legal page */
.legal .wrap { max-width: 46rem; display: grid; gap: 1rem; }
.legal h1 { font-size: var(--step-3); max-width: none; }
.legal h2 { font-size: var(--step-2); margin-top: 1.5rem; }
.legal h3 { font-size: 1.1rem; margin-top: 0.5rem; }
.legal-updated { color: var(--muted); }
.legal-list { margin: 0; display: grid; border-top: 1px solid var(--line); }
.legal-list > div { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 0.25rem 1.5rem; padding-block: 0.7rem; border-bottom: 1px solid var(--line); }
.legal-list dt { font-weight: 700; }
.legal-list dd { margin: 0; }
.legal-list .todo { color: var(--error); font-weight: 700; }
@media (max-width: 560px) { .legal-list > div { grid-template-columns: 1fr; } }

/* Demo page */
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; }
.demo-hero { padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.demo-hero .hero-kicker a { color: var(--muted); }
.demo-jump { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.demo-jump a { display: inline-block; padding: 0.4rem 0.85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 0.98rem; }
.demo-jump a:hover { border-color: var(--brand); color: var(--brand); }

.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(1.75rem, 4vw, 3.5rem); align-items: start; }
.demo-intro { display: grid; gap: 1rem; max-width: 34em; }
.demo-note { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) { .demo-grid { grid-template-columns: minmax(0, 1fr); } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.5rem); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; min-width: 0; }
.panel-off { color: var(--muted); font-style: italic; }

/* Chat */
.chat-log { display: flex; flex-direction: column; gap: 0.75rem; max-height: 26rem; min-height: 9rem; overflow-y: auto; padding-right: 0.25rem; }
.msg { max-width: 88%; padding: 0.7rem 0.95rem; border-radius: 12px; line-height: 1.5; display: grid; gap: 0.5rem; }
.msg p { overflow-wrap: anywhere; }
.msg-bot { align-self: flex-start; background: var(--tint); border-bottom-left-radius: 4px; }
.msg-user { align-self: flex-end; background: var(--brand); color: var(--on-brand); border-bottom-right-radius: 4px; }
.msg-wait { color: var(--muted); font-style: italic; }
.msg-sources { font-size: 0.9rem; color: var(--muted); }
.msg .btn-small { justify-self: start; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { font: inherit; font-size: 0.95rem; text-align: left; background: transparent; color: var(--brand); border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 0.8rem; cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.chat-form { display: flex; gap: 0.5rem; }
.chat-form input { flex: 1; min-width: 0; font: inherit; font-size: max(16px, 1rem); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.65rem 0.75rem; }
.chat-form input:focus { outline: 2px solid var(--glacier); outline-offset: 1px; border-color: var(--brand); }
.btn:disabled { opacity: 0.55; cursor: progress; }

/* Document */
.invoice { margin: 0; display: grid; gap: 0.4rem; }
.invoice pre { margin: 0; padding: 1rem; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); font-size: 0.82rem; line-height: 1.45; overflow-x: auto; }
.invoice figcaption { color: var(--muted); font-size: 0.9rem; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--glacier); outline-offset: 3px; }
.doc-status { min-height: 1.5em; }
.doc-status.err { color: var(--error); }
.doc-result { display: grid; gap: 0.9rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.doc-result h3 { font-size: 1.15rem; }
.checks { border-left: 4px solid var(--glacier); background: var(--tint); padding: 0.75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; }
.checks ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.checks-ok { border-left-color: var(--line); color: var(--muted); }
.doc-fields { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1.25rem; }
.doc-fields div { min-width: 0; }
.doc-fields dt { color: var(--muted); font-size: 0.88rem; }
.doc-fields dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .doc-fields { grid-template-columns: 1fr; } }
.table-scroll { overflow-x: auto; }
.doc-result table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.doc-result th, .doc-result td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); }
.doc-result thead th { color: var(--muted); font-weight: 400; font-size: 0.88rem; }
.doc-result tfoot th { text-align: right; font-weight: 400; color: var(--muted); }
.doc-result .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Calculator */
.calc-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 480px) { .calc-row { grid-template-columns: 1fr; } }
.calc select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.65rem 0.75rem; width: 100%; }
.calc input[type="range"] { width: 100%; accent-color: var(--brand); }
.calc output { font-weight: 700; }
.calc-out { display: grid; gap: 0.5rem; padding: 1rem; background: var(--tint); border-radius: var(--radius); }
.calc-out b { font-family: var(--font-display); font-size: 1.15em; }
.calc-key { padding-top: 0.5rem; border-top: 1px solid var(--line); }

/* Videos */
.videos { margin-top: 2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.video { margin: 0; display: grid; gap: 0.5rem; }
.video-frame { aspect-ratio: 16 / 9; background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 760px) { .videos { grid-template-columns: 1fr; } }

.demo-cta { display: grid; gap: 1rem; max-width: 46rem; }

/* Home page: pointer to the demos */
.offers-demo { margin-top: 1rem; font-weight: 700; }
