/* The pre-launch site in the website's "Pen & Paper" design (docs/website/DESIGN.md): one accent, pen blue.
 * The colour values are copied from website/src/styles.css: change them there first, then here. */

@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/geist-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/geist-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --font-sans: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  --background: oklch(0.972 0.005 255);
  --card: oklch(0.997 0.002 255);
  --secondary: oklch(0.955 0.007 255);
  --border: oklch(0.9 0.008 255);
  --border-strong: oklch(0.63 0.02 262);
  --foreground: oklch(0.21 0.035 262);
  --muted-foreground: oklch(0.5 0.025 262);

  --primary: oklch(0.5 0.2 264);
  --primary-hover: oklch(0.44 0.19 264);
  --primary-foreground: oklch(0.995 0.003 255);
  --primary-soft: oklch(0.95 0.03 264);
  --primary-ink: oklch(0.42 0.17 264);

  --success: oklch(0.52 0.13 152);
  --success-soft: oklch(0.955 0.035 152);
  --success-ink: oklch(0.42 0.105 152);
  --destructive-ink: oklch(0.47 0.17 27);
  --destructive-soft: oklch(0.958 0.025 27);
  --warning-soft: oklch(0.962 0.045 80);
  --warning-ink: oklch(0.45 0.1 62);
  --info-soft: oklch(0.955 0.03 215);
  --info-ink: oklch(0.42 0.09 220);

  --elevation-raised: 0 1px 2px oklch(0.21 0.035 262 / 0.06), 0 1px 1px oklch(0.21 0.035 262 / 0.03);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: oklch(0.165 0.02 262);
    --card: oklch(0.205 0.024 262);
    --secondary: oklch(0.25 0.025 262);
    --border: oklch(0.31 0.025 262);
    --border-strong: oklch(0.52 0.025 262);
    --foreground: oklch(0.95 0.01 262);
    --muted-foreground: oklch(0.74 0.025 262);

    --primary: oklch(0.72 0.15 264);
    --primary-hover: oklch(0.78 0.13 264);
    --primary-foreground: oklch(0.18 0.03 262);
    --primary-soft: oklch(0.3 0.07 264);
    --primary-ink: oklch(0.84 0.09 264);

    --success: oklch(0.72 0.14 152);
    --success-soft: oklch(0.27 0.05 152);
    --success-ink: oklch(0.8 0.13 152);
    --destructive-ink: oklch(0.78 0.13 25);
    --destructive-soft: oklch(0.28 0.06 25);
    --warning-soft: oklch(0.29 0.05 75);
    --warning-ink: oklch(0.85 0.12 80);
    --info-soft: oklch(0.28 0.05 215);
    --info-ink: oklch(0.82 0.09 215);

    --elevation-raised: 0 1px 2px oklch(0.05 0.02 262 / 0.4);
  }
}

/* Mobile first: the base rules are the phone layout, and min-width queries add to it.
 * Logical properties only (inline-start, padding-inline...), so an Arabic page with dir="rtl" mirrors by itself. */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}
h1,
h2 {
  font-weight: 650;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
a {
  color: var(--primary);
}
::selection {
  background: color-mix(in oklch, var(--primary) 22%, transparent);
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
[id] {
  scroll-margin-top: 1.5rem;
}
.sprite {
  position: absolute;
}
.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.muted {
  color: var(--muted-foreground);
  font-weight: 400;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 500;
  text-decoration: none;
  z-index: 30;
}
.skip-link:focus {
  top: 1rem;
}

.measure {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px) {
  .measure {
    padding-inline: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .measure {
    padding-inline: 2.5rem;
  }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding-inline: 1.25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--elevation-raised);
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.button:hover {
  background: var(--primary-hover);
}
.button:active {
  transform: scale(0.98);
}
.button:disabled {
  cursor: progress;
  opacity: 0.8;
}
.button-lg {
  min-height: 3rem;
  padding-inline: 1.5rem;
}
.button-sm {
  min-height: 2.5rem;
  padding-inline: 1rem;
  font-size: 0.875rem;
}
.button-secondary {
  background: var(--card);
  border-color: var(--border);
  color: var(--foreground);
}
.button-secondary:hover {
  background: var(--secondary);
}
.button-block {
  width: 100%;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  color: var(--foreground);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.seal,
.seal img {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
}
.accent {
  color: var(--primary);
}

/* Sections */
main {
  flex: 1;
}
.band {
  margin-top: 5rem;
}
@media (min-width: 1024px) {
  .band {
    margin-top: 8rem;
  }
}
.eyebrow {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}
.section-heading {
  font-size: 1.875rem;
  line-height: 1.2;
}
@media (min-width: 640px) {
  .section-heading {
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
  }
}
.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--elevation-raised);
}
.card-text {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
}

/* 1. Hero */
.hero {
  display: grid;
  gap: 2.5rem;
  padding-top: 2.5rem;
}
@media (min-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 4rem;
    padding-top: 5rem;
  }
}
.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 0.875rem;
  font-weight: 500;
}
h1 {
  margin-top: 1rem;
  font-size: 2.375rem;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
@media (min-width: 640px) {
  h1 {
    font-size: 3rem;
    line-height: 1.04;
  }
}
@media (min-width: 1024px) {
  h1 {
    font-size: 3.5rem;
  }
}
.lede {
  margin-top: 1.25rem;
  max-width: 52ch;
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--muted-foreground);
}
.hero .button {
  margin-top: 2rem;
}

/* The chat mock: decorative, the copy beside it says the same thing. */
.chat {
  max-width: 26rem;
  width: 100%;
  justify-self: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--secondary);
  box-shadow: var(--elevation-raised);
  overflow: hidden;
  font-size: 0.875rem;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.chat-head strong {
  display: block;
  font-weight: 600;
}
.chat-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.avatar {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 0.75rem;
  font-weight: 600;
}
.chat-body {
  display: grid;
  gap: 0.625rem;
  padding: 1rem;
}
.bubble {
  max-width: 85%;
  padding: 0.625rem 0.75rem;
  border-radius: 12px;
  line-height: 1.25rem;
}
.bubble-out {
  justify-self: end;
  border-end-end-radius: 4px;
  background: var(--primary);
  color: var(--primary-foreground);
}
.bubble-link {
  display: block;
  margin-top: 0.25rem;
  font-weight: 600;
  text-decoration: underline;
}
.bubble-meta {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.75rem;
  opacity: 0.85;
  text-align: end;
}
.event {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font-weight: 500;
}
.event .icon {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}
.event-paid {
  background: var(--success-soft);
  border-color: transparent;
  color: var(--success-ink);
}
.event-paid .icon {
  color: var(--success-ink);
}
.event-time {
  margin-inline-start: auto;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted-foreground);
}
.event-paid .event-time {
  color: inherit;
}
/* Each step lands in turn, once. */
.chat-body > li {
  animation: rise 400ms var(--ease-out) both;
}
.chat-body > li:nth-child(2) {
  animation-delay: 500ms;
}
.chat-body > li:nth-child(3) {
  animation-delay: 1000ms;
}
.chat-body > li:nth-child(4) {
  animation-delay: 1500ms;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* 2. Problem */
.problem-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  max-width: 44rem;
}
.problem-list li {
  padding-inline-start: 1rem;
  border-inline-start: 3px solid var(--border);
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--muted-foreground);
}

/* 3. How it works */
.steps {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;
}
@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.step-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.steps h3,
.feature h3 {
  margin-top: 1rem;
  font-size: 1.125rem;
}
.steps p,
.feature p {
  margin-top: 0.5rem;
  line-height: 1.625rem;
  color: var(--muted-foreground);
}

/* 4. Features */
.features {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}
@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.feature {
  padding: 1.25rem;
}
.feature .icon {
  color: var(--primary);
}
.feature h3 {
  margin-top: 0.75rem;
}

/* 5. Founding offer */
.perks {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.perks li {
  display: flex;
  gap: 0.5rem;
  font-size: 1.125rem;
}
.perks .icon {
  margin-top: 0.25rem;
  color: var(--success);
}
.plans {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .plans {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 22rem));
  }
}
.plan {
  padding: 1.5rem;
}
.plan h3 {
  font-size: 1.125rem;
}
.plan-label {
  display: inline-flex;
  margin-top: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 0.75rem;
  font-weight: 500;
}
.plan-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  margin-top: 0.5rem;
}
.plan-amount {
  font-size: 1.875rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.plan-was {
  color: var(--muted-foreground);
}
.plan-includes {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
}
.note {
  margin-top: 1rem;
  max-width: 60ch;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.band > .button {
  margin-top: 1.5rem;
}

/* 6. FAQ */
.faq {
  margin-top: 1.5rem;
  max-width: 48rem;
  border-top: 1px solid var(--border);
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  min-height: 2.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  flex-shrink: 0;
  color: var(--muted-foreground);
  font-weight: 400;
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  padding-bottom: 1.25rem;
  max-width: 65ch;
  line-height: 1.625rem;
  color: var(--muted-foreground);
}

/* 7. Signup */
.form-card {
  max-width: 40rem;
  margin-inline: auto;
  padding: 1.25rem;
}
@media (min-width: 640px) {
  .form-card {
    padding: 2.5rem;
  }
}
.form-card .section-heading {
  font-size: 1.75rem;
}
.callout {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  background: var(--destructive-soft);
  color: var(--destructive-ink);
  font-size: 0.875rem;
  font-weight: 500;
}
.field {
  margin-top: 1.25rem;
}
.field > label,
.sub-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.sub-label {
  margin-top: 0.75rem;
}
.field input:not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 1rem; /* 16px so iOS does not zoom in */
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.field textarea {
  resize: vertical;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary) 22%, transparent);
}
.field input[aria-invalid="true"] {
  border-color: var(--destructive-ink);
}
.phone {
  display: flex;
  gap: 0.5rem;
}
.field .phone select {
  width: 6.75rem;
  flex-shrink: 0;
  padding-inline: 0.5rem;
}
.field-error {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--destructive-ink);
}
.check {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  padding-block: 0.5rem;
  font-size: 0.9375rem;
  cursor: pointer;
}
.check input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.125rem 0 0;
  flex-shrink: 0;
  accent-color: var(--primary);
}
.check[aria-invalid="true"],
.check:has([aria-invalid="true"]) {
  color: var(--destructive-ink);
}
.hp {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
form .button-block {
  margin-top: 1.5rem;
}

/* Footer */
.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted-foreground);
}
.footer-links a:hover {
  color: var(--foreground);
}

/* /thanks, /privacy, /terms */
.page {
  max-width: 44rem;
  padding-top: 3rem;
}
.page h1 {
  font-size: 2.25rem;
}
.page h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}
.page p,
.page li {
  margin-top: 0.75rem;
  line-height: 1.75rem;
  color: var(--muted-foreground);
}
.page ul {
  padding-inline-start: 1.25rem;
  list-style: disc;
}
.next-steps {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  counter-reset: step;
}
.next-steps li {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  counter-increment: step;
}
.next-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 0.875rem;
  font-weight: 600;
}
.page .button {
  margin-top: 2rem;
}
.placeholder {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--warning-soft);
  color: var(--warning-ink);
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* The hub (/) */
.hero-hub {
  display: block;
}
.band-tight {
  margin-top: 3rem;
}
.niche-cards {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
@media (min-width: 768px) {
  .niche-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.niche-card {
  position: relative;
  display: block;
  height: 100%;
  padding: 1.25rem 1.25rem 3.25rem;
  color: var(--foreground);
  text-decoration: none;
  transition: border-color 150ms var(--ease-out);
}
.niche-card:hover {
  border-color: var(--primary);
}
.niche-card h3 {
  font-size: 1.125rem;
}
.niche-card p {
  margin-top: 0.5rem;
  line-height: 1.625rem;
  color: var(--muted-foreground);
}
.niche-go {
  position: absolute;
  inset-inline-start: 1.25rem;
  bottom: 1.25rem;
  color: var(--primary);
}
[dir="rtl"] .niche-go .icon {
  transform: scaleX(-1);
}
/* The "Something else" form stays closed until its card (or an error redirect) points at #signup. */
.hub #signup:not(:target) {
  display: none;
}
