/* ============================================================
   investedinstead.com
   Design language: retail pricing. The struck-through original,
   the clearance sticker, the till receipt. Figures are always
   mono and tabular, because they are the content.
   ============================================================ */

:root {
  --ink:      #14171C;
  --paper:    #FBFAF7;
  --card:     #FFFFFF;
  --rule:     #DCD8CF;
  --muted:    #6C7076;

  --sticker:  #F0A202;   /* the price tag */
  --gain:     #16794F;
  --loss:     #C0392B;

  --display:  'Anton', Impact, sans-serif;
  --body:     'IBM Plex Sans', system-ui, sans-serif;
  --mono:     'IBM Plex Mono', ui-monospace, monospace;

  --gutter:   clamp(1.25rem, 4vw, 3rem);
  --measure:  74rem;
}

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

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

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--sticker);
  outline-offset: 3px;
}

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

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 1.25rem;
  border-bottom: 2px solid var(--ink);
}

.wordmark {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  letter-spacing: 0.01em;
  text-decoration: none;
  text-transform: uppercase;
}
.wordmark span { color: var(--sticker); }

.masthead nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.masthead nav a { text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.masthead nav a:hover { border-bottom-color: var(--sticker); }

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

.hero { padding: clamp(3rem, 9vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem); }

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 7.5vw, 5.25rem);
  line-height: 0.94;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}
.hero h1 em { font-style: normal; color: var(--sticker); }

.hero p {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--muted);
}

/* ---------- the signature: price ticket ---------- */

.ticket {
  position: relative;
  background: var(--card);
  border: 2px solid var(--ink);
  padding: 1.5rem 1.5rem 1.25rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
}

.ticket:hover { box-shadow: 6px 6px 0 var(--ink); transform: translate(-2px, -2px); }
.ticket { transition: transform .12s ease, box-shadow .12s ease; }

.ticket-era {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticket-name {
  font-family: var(--display);
  font-size: 1.4rem;
  line-height: 1.08;
  text-transform: uppercase;
  margin: 0.15rem 0 0.6rem;
}

/* The struck-through original price. */
.was {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

/* The sticker slapped over it. */
.now {
  align-self: flex-start;
  margin-top: 0.35rem;
  background: var(--sticker);
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 0.3rem 0.8rem;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
  transform: rotate(-1.6deg);
}
.now.is-loss { background: var(--loss); color: #fff; }
.now.is-flat { background: var(--paper); }

.ticket-verdict {
  margin-top: auto;
  padding-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}
.is-gain .ticket-verdict, .verdict-gain { color: var(--gain); }
.is-loss .ticket-verdict, .verdict-loss { color: var(--loss); }

/* ---------- grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.25rem;
  padding-bottom: 4rem;
  list-style: none;
  margin: 0;
  padding-inline: 0;
}
.grid li { display: flex; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 3rem 0 1.5rem;
  border-top: 2px solid var(--ink);
  padding-top: 0.75rem;
}
.section-head h2 {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 1.4rem;
  margin: 0;
}
.section-head span {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- product page ---------- */

.product { padding: clamp(2rem, 6vw, 4rem) 0; }

.product-era {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.product h1 {
  font-family: var(--display);
  font-size: clamp(2.25rem, 6.5vw, 4.25rem);
  line-height: 0.96;
  text-transform: uppercase;
  margin: 0.5rem 0 1.75rem;
  max-width: 20ch;
}

.product-blurb {
  font-size: 1.15rem;
  max-width: 54ch;
  margin: 0 0 2.5rem;
}

/* The two-column comparison. What you bought vs what you'd hold. */
.ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--ink);
  background: var(--card);
}
.ledger > div { padding: clamp(1.25rem, 3vw, 2rem); }
.ledger > div + div { border-left: 2px solid var(--ink); }

.ledger-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.figure {
  font-family: var(--mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.75rem, 5.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}
.figure.is-past { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 3px; }
.figure.is-gain { color: var(--gain); }
.figure.is-loss { color: var(--loss); }

.figure-sub {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Detail rows, set like a receipt. */
.receipt {
  margin: 2rem 0 0;
  border-top: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.9rem;
}
.receipt div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
.receipt dt { color: var(--muted); margin: 0; }
.receipt dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }

.note {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--sticker);
  background: var(--card);
  font-size: 0.95rem;
}

.source-line {
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------- stale guard ---------- */

.stale {
  max-width: var(--measure);
  margin: 1.5rem auto 0;
  padding: 1rem 1.25rem;
  border: 2px solid var(--loss);
  background: #fff;
  font-size: 0.95rem;
}
.stale strong { display: block; }

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

.footer {
  border-top: 2px solid var(--ink);
  margin-top: 4rem;
  padding: 2rem var(--gutter) 3rem;
  max-width: var(--measure);
  margin-inline: auto;
}
.footer-note { max-width: 62ch; color: var(--muted); font-size: 0.9rem; margin: 0 0 1rem; }
.footer-meta { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); margin: 0; }
.footer-meta a { margin-left: 1rem; }

/* ---------- method page ---------- */

.method-content {
  max-width: 54ch;
  padding: clamp(2rem, 6vw, 4rem) 0;
}

.method-content h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}

.method-content h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  text-transform: uppercase;
  margin: 2.5rem 0 0.75rem;
  padding-top: 2rem;
  border-top: 2px solid var(--rule);
}

.method-intro {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.method-content p { margin: 0 0 1rem; }

.method-disclaimer {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--sticker);
  background: var(--card);
  font-size: 0.9rem;
  color: var(--muted);
}

.method-divider {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 3rem 0;
}

/* ---------- contact form ---------- */

.contact-form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.required { color: var(--loss); }

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--ink);
  background: var(--card);
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 3px solid var(--sticker);
  outline-offset: 2px;
}

.form-row textarea { resize: vertical; min-height: 8rem; }

.btn-submit {
  align-self: flex-start;
  padding: 0.75rem 2rem;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}

.btn-submit:hover {
  background: var(--sticker);
  color: var(--ink);
  border-color: var(--ink);
}

.contact-success {
  padding: 2rem 1.5rem;
  border: 2px solid var(--gain);
  background: var(--card);
}
.contact-success h2 { margin: 0 0 0.5rem; font-family: var(--display); text-transform: uppercase; }
.contact-success p { margin: 0; }

.contact-error {
  padding: 0.85rem 1.25rem;
  border: 2px solid var(--loss);
  background: var(--card);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* ---------- responsive ---------- */

@media (max-width: 34rem) {
  .ledger { grid-template-columns: 1fr; }
  .ledger > div + div { border-left: 0; border-top: 2px solid var(--ink); }
  .masthead { padding-bottom: 0.9rem; }
  .masthead nav { gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .ticket:hover { transform: none; }
  .now { transform: none; }
}
