/* ==========================================================================
   Qubit  |  qubitapp.live
   Brand tokens come from QUBIT_BRAND.md. Two standing rules live in this file:
     1. ZERO EM-DASHES in any visible text.
     2. Accent (teal) marks ACTION only. Never decoration, never a surface.
   ========================================================================== */

:root {
  /* Surface: warm, calm, near-paper. The identity comes from surface plus
     typography, not from a loud brand colour. */
  --surface:        #fcf9f8;
  --surface-raised: #ffffff;
  --hairline:       #e9e2df;

  /* Ink */
  --ink:        #232323;   /* brand neutral, 15.0:1 on surface */
  --ink-muted:  #5f5a57;   /* 6.5:1 on surface */
  --ink-quiet:  #77716e;   /* 4.6:1 on surface, large or secondary text only */

  /* Accent: Qubit teal. Fill is the brand value; the text variant is darkened
     because #21BCAC on a light surface is only 2.3:1 and reads washed out. */
  --teal:       #21bcac;   /* fills only */
  --teal-text:  #0b6f65;   /* 5.8:1 on surface */
  --teal-press: #1aa89a;

  --measure: 46rem;

  --step-0: 1rem;
  --step-1: 1.0625rem;
  --step-2: clamp(1.125rem, 0.95rem + 0.8vw, 1.4rem);
  --display: clamp(2.6rem, 1.6rem + 4.6vw, 4.75rem);
  --section: clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem);

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans:  "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-1);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, p, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; }

::selection { background: rgba(33, 188, 172, 0.22); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  text-decoration: none;
}

/* --------------------------------------------------------------- brand --- */

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: clamp(1.6rem, 4vw, 2.75rem) clamp(1.4rem, 6vw, 4rem);
}

.brand__home {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  width: 30px;
  height: 30px;
}

.brand__word {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  color: var(--ink);
}

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

.hero {
  padding: clamp(3.5rem, 11vh, 8rem) clamp(1.4rem, 6vw, 4rem) clamp(5rem, 14vh, 9.5rem);
  max-width: 62rem;
  margin: 0 auto;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--display);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--ink);
  /* The line break is left to the browser (no hard <br>): 15ch plus balance
     gives "A second memory / for your work." on wide screens and a clean
     three-line stack on a phone. */
  max-width: 15ch;
  text-wrap: balance;
}

.hero__sub {
  margin-top: clamp(1.4rem, 3vw, 2rem);
  max-width: 34rem;
  font-size: var(--step-2);
  line-height: 1.55;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.hero__cta { margin-top: clamp(2.25rem, 5vw, 3rem); }

/* The single accent on the page: one action, one teal fill.
   Ink on teal is 6.6:1; white on teal would be 2.4:1 and would fail. */
.button {
  display: inline-block;
  background: var(--teal);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  padding: 0.95rem 1.7rem;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(35, 35, 35, 0.08), 0 10px 24px -14px rgba(11, 111, 101, 0.55);
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.button:hover {
  background: var(--teal-press);
  box-shadow: 0 1px 2px rgba(35, 35, 35, 0.10), 0 14px 30px -14px rgba(11, 111, 101, 0.65);
}
.button:active { transform: translateY(1px); }

.hero__meta {
  margin-top: 1.1rem;
  font-size: 0.875rem;
  color: var(--ink-quiet);
  letter-spacing: 0.002em;
}

/* -------------------------------------------------------- capabilities --- */

.capabilities {
  border-top: 1px solid var(--hairline);
  padding: clamp(3.5rem, 9vw, 6rem) clamp(1.4rem, 6vw, 4rem);
  max-width: 62rem;
  margin: 0 auto;
}

.section__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--section);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: var(--measure);
}

.rows {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  display: grid;
  gap: clamp(1.5rem, 3.4vw, 2.25rem);
  max-width: var(--measure);
}

.row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

/* Quiet ink glyph wells. Teal is reserved for the action above, so nothing
   here is tinted. */
.row__glyph {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
}
.row__glyph svg { width: 21px; height: 21px; }

.row__text {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}

/* --------------------------------------------------------------- trust --- */

.trust {
  border-top: 1px solid var(--hairline);
  padding: clamp(3rem, 7vw, 4.5rem) clamp(1.4rem, 6vw, 4rem);
  max-width: 62rem;
  margin: 0 auto;
}

.trust__line {
  max-width: var(--measure);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.85rem;
  row-gap: 0.25rem;
  align-items: start;
}

/* The one small accent besides the button. It marks the promise the whole
   product rests on, and it repeats the in-product treatment. */
.trust__lock {
  grid-row: 1;
  color: var(--teal-text);
  margin-top: 0.15rem;
}
.trust__lock svg { width: 20px; height: 20px; }

.trust__line strong {
  grid-column: 2;
  font-weight: 600;
  font-size: var(--step-1);
  color: var(--ink);
  text-wrap: pretty;
}

.trust__second {
  grid-column: 2;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

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

.footer {
  border-top: 1px solid var(--hairline);
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 2.75rem) clamp(1.4rem, 6vw, 4rem) clamp(3rem, 6vw, 4rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  font-size: 0.875rem;
  color: var(--ink-quiet);
}

.footer a {
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1px;
  transition: color 140ms ease, border-color 140ms ease;
}
.footer a:hover {
  color: var(--ink);
  border-color: var(--ink-quiet);
}

/* --------------------------------------------------------------- tools --- */

.tool-hero,
.calculator-shell,
.tool-section {
  max-width: 70rem;
  margin: 0 auto;
  padding-inline: clamp(1.4rem, 6vw, 4rem);
}

.tool-hero {
  padding-top: clamp(2rem, 7vh, 4.5rem);
  padding-bottom: clamp(2.5rem, 7vw, 4.5rem);
}

.eyebrow {
  margin-bottom: 0.85rem;
  color: var(--teal-text);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-hero__title {
  max-width: 16ch;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.25rem, 1.45rem + 3.5vw, 4.6rem);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.05;
  text-wrap: balance;
}

.tool-hero__sub {
  max-width: 42rem;
  margin-top: 1.35rem;
  color: var(--ink-muted);
  font-size: var(--step-2);
  line-height: 1.55;
  text-wrap: pretty;
}

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.5fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(2.25rem, 5vw, 3.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--hairline);
}

.calculator-copy h2,
.tool-section h2 {
  font-family: var(--serif);
  font-size: var(--section);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

.calculator-copy p,
.tool-prose p {
  margin-top: 1rem;
  color: var(--ink-muted);
}

.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.85fr);
  gap: 1.2rem;
  align-items: start;
}

.generator-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.66fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 3.5rem) clamp(1.4rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--hairline);
}

.generator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.inputs {
  display: grid;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field__label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.8rem;
}

.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font: inherit;
  padding: 0.75rem 0.8rem;
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

.field input[type="range"] {
  min-height: auto;
  padding: 0;
  accent-color: var(--teal-text);
  background: transparent;
}

.field__hint,
.copy-status {
  color: var(--ink-quiet);
  font-size: 0.82rem;
  line-height: 1.45;
}

.result {
  position: sticky;
  top: 1rem;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 1.2rem;
}

.generated-output {
  position: sticky;
  top: 1rem;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 1.2rem;
}

.output-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.generated-output pre {
  overflow: auto;
  max-height: 42rem;
  margin: 0;
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.result__state {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  color: var(--teal-text);
  font-size: 0.85rem;
  font-weight: 600;
}

.result-grid {
  display: grid;
  gap: 0.9rem;
  margin: 1.15rem 0 0;
}

.result-grid div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--hairline);
  padding-top: 0.85rem;
}

.result-grid dt {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.result-grid dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.result__advice {
  margin-top: 1.1rem;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

.button--secondary {
  margin-top: 1.1rem;
  border: 0;
  cursor: pointer;
}

.copy-status {
  min-height: 1.2rem;
  margin-top: 0.7rem;
}

.tool-section {
  border-top: 1px solid var(--hairline);
  padding-top: clamp(2.75rem, 6vw, 4rem);
  padding-bottom: clamp(2.75rem, 6vw, 4rem);
}

.tool-prose {
  max-width: var(--measure);
}

.tool-prose h3,
.guide h3 {
  margin-top: 1.55rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.tool-prose ul,
.tool-prose ol,
.guide ul,
.guide ol {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-left: 1.2rem;
  color: var(--ink-muted);
}

.tool-prose ul,
.guide ul {
  list-style: disc;
}

.tool-prose ol,
.guide ol {
  list-style: decimal;
}

.tool-prose li,
.guide li {
  padding-left: 0.2rem;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 62rem;
  margin-top: 1.4rem;
}

.info-box {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 1rem;
}

.info-box h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

.info-box p,
.info-box ul,
.info-box ol {
  margin-top: 0.75rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.info-box ul,
.info-box ol {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.1rem;
}

.example-block {
  overflow: auto;
  margin-top: 1rem;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.6;
  padding: 1rem;
  white-space: pre-wrap;
}

.faq-list {
  display: grid;
  gap: 1rem;
  max-width: var(--measure);
  margin-top: 1.2rem;
}

.faq-list details {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 0.9rem 1rem;
}

.faq-list summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
}

.faq-list p {
  margin-top: 0.7rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.tool-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  max-width: 56rem;
  margin-top: 1.4rem;
}

.tool-card {
  display: grid;
  gap: 0.45rem;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 1rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease;
}

.tool-card:hover {
  border-color: rgba(11, 111, 101, 0.45);
  transform: translateY(-1px);
}

.tool-card span {
  color: var(--ink);
  font-weight: 600;
}

.tool-card small {
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.guide {
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(2rem, 7vh, 4.5rem) clamp(1.4rem, 6vw, 4rem) clamp(4rem, 8vw, 6rem);
}

.guide h1 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.25rem, 1.45rem + 3.5vw, 4.6rem);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.05;
  text-wrap: balance;
}

.guide__dek {
  margin-top: 1.35rem;
  color: var(--ink-muted);
  font-size: var(--step-2);
  line-height: 1.55;
  text-wrap: pretty;
}

.guide section {
  border-top: 1px solid var(--hairline);
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(1.7rem, 4vw, 2.3rem);
}

.guide h2 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--section);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

.guide p {
  margin-top: 1rem;
  color: var(--ink-muted);
}

.guide a {
  color: var(--teal-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prompt-block {
  overflow: auto;
  margin: 1rem 0 0;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.6;
  padding: 1rem;
  white-space: pre-wrap;
}

/* --------------------------------------------------------------- small --- */

@media (max-width: 30rem) {
  .hero__title { max-width: 13ch; }
  .button { display: block; text-align: center; }
  .row { align-items: flex-start; }
  .row__glyph { width: 40px; height: 40px; }
  .row__glyph svg { width: 19px; height: 19px; }
  .tool-cards,
  .section-grid { grid-template-columns: 1fr; }
}

@media (max-width: 58rem) {
  .calculator-shell,
  .calculator,
  .generator-shell,
  .generator {
    grid-template-columns: 1fr;
  }

  .result,
  .generated-output {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
