/* ============================================================
   Superbot: Match Journal — shared styles
   Palette follows the app: paper white, ink black, signal red
   ============================================================ */

:root {
  --paper: #f6f6f4;
  --paper-deep: #ecece8;
  --ink: #111111;
  --mute: #5a5a5a;
  --faint: #8a8a8a;
  --card: #ffffff;
  --line: #e4e4e0;
  --red: #e10600;
  --red-deep: #b10500;
  --red-soft: rgba(225, 6, 0, 0.08);
  --dark: #1c1c1c;
  --dark-card: #2a2a2a;
  --dark-line: #3a3a3a;
  --shadow: 0 10px 28px rgba(17, 17, 17, 0.08);
  --radius: 16px;
  --margin: 52px;
  --header-h: 68px;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--red);
  color: #fff;
  padding: 8px 12px;
  z-index: 80;
}

.skip:focus {
  top: 12px;
}

/* Ruled paper + red journal margin */
.page {
  position: relative;
  min-height: 100vh;
}

.page::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 31px,
    rgba(17, 17, 17, 0.035) 31px,
    rgba(17, 17, 17, 0.035) 32px
  );
  z-index: 0;
}

.margin-rule {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--margin);
  width: 2px;
  background: var(--red);
  z-index: 2;
  pointer-events: none;
}

.margin-rule::before,
.margin-rule::after {
  content: "";
  position: absolute;
  left: -5px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--red);
  border-radius: 50%;
  background: var(--paper);
}

.margin-rule::before {
  top: calc(var(--header-h) + 18px);
}

.margin-rule::after {
  bottom: 28px;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding-left: 36px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: rgba(246, 246, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand svg {
  flex-shrink: 0;
}

.brand-name {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--red);
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--red);
}

.nav-cta {
  background: var(--red);
  color: #fff !important;
  padding: 8px 14px;
  border-radius: 999px;
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

/* Hero */
.hero {
  padding: 56px 0 28px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}

.kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: end;
}

.display {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.88;
  margin: 0 0 18px;
  font-size: clamp(56px, 9vw, 104px);
}

.display span {
  display: block;
  color: var(--red);
}

.lede {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  max-width: 18ch;
  margin: 0 0 20px;
}

.hero p.intro {
  max-width: 42ch;
  color: var(--mute);
  margin: 0 0 28px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
}

.btn-red {
  background: var(--red);
  color: #fff;
}

.btn-red:hover {
  background: var(--red-deep);
}

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: #fff;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
  font-size: 13px;
  color: var(--mute);
}

.meta-row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

/* Phone stack */
.desk {
  position: relative;
  min-height: 560px;
}

.device {
  background: #111;
  border-radius: 32px;
  padding: 10px;
  box-shadow: var(--shadow);
  width: min(260px, 70%);
}

.device img {
  border-radius: 22px;
  width: 100%;
  height: auto;
}

.device-a {
  position: relative;
  z-index: 3;
}

.device-b {
  position: absolute;
  right: 8%;
  top: 48px;
  z-index: 2;
  transform: rotate(7deg);
  width: min(230px, 62%);
}

.device-c {
  position: absolute;
  left: 6%;
  bottom: -20px;
  z-index: 1;
  transform: rotate(-6deg);
  width: min(210px, 56%);
}

/* Keyword tape — repeating motif */
.tape {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: #fff;
  margin: 48px 0 0;
}

.tape-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: tape 28s linear infinite;
}

.tape-track span {
  font-family: "Oswald", sans-serif;
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 22px;
  color: var(--ink);
  white-space: nowrap;
}

.tape-track span b {
  color: var(--red);
  font-weight: 600;
}

@keyframes tape {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Pitch divider */
.pitch {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 64px 0 36px;
}

.pitch::before,
.pitch::after {
  content: "";
  height: 1px;
  background: var(--red);
  flex: 1;
}

.pitch i {
  width: 14px;
  height: 14px;
  border: 2px solid var(--red);
  border-radius: 50%;
  display: block;
}

/* Sections */
section {
  padding: 8px 0 24px;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 8px;
}

h2 {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 0.95;
  margin: 0 0 16px;
}

.serif {
  font-family: "Source Serif 4", Georgia, serif;
}

.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.story p {
  color: var(--mute);
  margin: 0 0 16px;
}

.story p:last-child {
  margin-bottom: 0;
}

/* Journal cards — same language as the app */
.logbook {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.log-head {
  font-weight: 700;
  font-size: 22px;
  margin: 18px 0 4px;
}

.note {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
}

.note h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.note time {
  color: var(--faint);
  font-size: 13px;
}

.note p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--mute);
  font-size: 14px;
}

.note-red {
  border-left: 4px solid var(--red);
}

/* Feature board */
.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tile {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  box-shadow: var(--shadow);
  min-height: 210px;
}

.tile svg {
  margin-bottom: 16px;
}

.tile h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.tile p {
  margin: 0;
  color: var(--mute);
  font-size: 15px;
}

/* Dark thinking band */
.thinking {
  margin: 56px calc(50% - 50vw) 24px;
  padding: 72px 0;
  background: var(--dark);
  color: #f3f3f3;
  position: relative;
}

.thinking .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.thinking .section-label {
  color: #ff6b66;
}

.thinking p {
  color: #c8c8c8;
}

.think-panel {
  background: var(--dark-card);
  border-radius: 24px;
  padding: 28px;
}

.toggles {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--dark-line);
}

.switch {
  width: 44px;
  height: 26px;
  background: #4a4a4a;
  border-radius: 999px;
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
}

.switch.on {
  background: var(--red);
}

.progress-ring {
  display: grid;
  place-items: center;
  padding: 18px 0 8px;
}

.progress-ring strong {
  font-family: "Oswald", sans-serif;
  font-size: 36px;
  margin-top: 8px;
}

.progress-ring small {
  color: #9a9a9a;
}

/* Week rhythm */
.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 28px;
}

.day {
  background: var(--card);
  border-radius: 12px;
  padding: 14px 8px 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.day b {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}

.bar {
  height: 92px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bar i {
  display: block;
  width: 18px;
  border-radius: 8px 8px 2px 2px;
  background: var(--paper-deep);
}

.day.on .bar i {
  background: var(--red);
}

.day small {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--mute);
}

/* Screenshot strip */
.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 12px 0 8px;
}

.shots .device {
  width: 100%;
}

@media (max-width: 720px) {
  .shots {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .shots .device {
    flex: 0 0 200px;
    scroll-snap-align: start;
  }
}

/* Quote */
.pull {
  margin: 48px 0;
  padding: 8px 0 8px 28px;
  border-left: 3px solid var(--red);
}

.pull p {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
  margin: 0;
}

/* CTA band */
.cta {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  align-items: center;
  margin: 24px 0 72px;
}

.cta p {
  color: var(--mute);
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  background: #fff;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.site-footer h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.site-footer p,
.site-footer a {
  color: var(--mute);
  font-size: 14px;
}

.site-footer a {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 6px;
}

.site-footer a:hover {
  color: var(--red);
}

.stamp {
  margin-top: 28px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Inner legal / contact pages */
.sheet {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: clamp(28px, 4vw, 56px);
  margin: 36px 0 72px;
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.effective {
  font-size: 13px;
  color: var(--mute);
  text-align: right;
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  font-size: 28px;
  margin: 36px 0 12px;
}

.prose h3 {
  font-size: 18px;
  margin: 28px 0 8px;
}

.prose p,
.prose li {
  color: var(--mute);
}

.prose ul {
  padding-left: 18px;
}

.prose strong {
  color: var(--ink);
}

/* Contact */
.who {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}

.field-card {
  background: var(--paper);
  border-radius: 14px;
  padding: 16px 18px;
}

.field-card span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

.field-card a,
.field-card b {
  font-size: 20px;
  text-decoration: none;
}

.form {
  display: grid;
  gap: 14px;
}

.form label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.form input,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form button {
  cursor: pointer;
  font: inherit;
}

.form-note {
  display: none;
  background: var(--red-soft);
  color: var(--red-deep);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
}

.form-note.show {
  display: block;
}

/* Extra visual filler: hash marks */
.hash {
  display: flex;
  gap: 6px;
  margin: 10px 0 0;
}

.hash i {
  width: 18px;
  height: 3px;
  background: var(--red);
  opacity: 0.35;
}

.hash i:nth-child(2) {
  opacity: 0.7;
}

.hash i:nth-child(3) {
  opacity: 1;
}

@media (max-width: 980px) {
  :root {
    --margin: 28px;
  }

  .hero-grid,
  .story,
  .thinking .wrap,
  .cta,
  .foot-grid,
  .who {
    grid-template-columns: 1fr;
  }

  .board {
    grid-template-columns: 1fr 1fr;
  }

  .desk {
    min-height: 520px;
    margin-top: 12px;
  }

  .device-b {
    right: 0;
  }
}

@media (max-width: 720px) {
  :root {
    --margin: 18px;
    --header-h: 60px;
  }

  .wrap {
    width: min(var(--max), calc(100% - 24px));
    padding-left: 22px;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 22px 40px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .nav.open {
    display: flex;
  }

  .board {
    grid-template-columns: 1fr;
  }

  .week {
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
  }

  .day {
    padding: 10px 2px 8px;
  }

  .bar {
    height: 72px;
  }

  .bar i {
    width: 10px;
  }

  .device {
    width: min(220px, 68%);
  }

  .desk {
    min-height: 430px;
  }

  .cta,
  .sheet {
    padding: 24px 18px;
  }

  .sheet-top {
    flex-direction: column;
  }

  .effective {
    text-align: left;
  }

  .thinking {
    padding: 48px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tape-track {
    animation: none;
  }
}
