/* FillYaTank — shared styles */

/* Caveat by The Caveat Project Authors, SIL Open Font License 1.1 (fonts/Caveat-OFL.txt) */
@font-face {
  font-family: "Caveat";
  src: url("/fonts/caveat.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-muted: #f2f3ef;
  --text: #1b1f1d;
  --text-muted: #525a55;
  --border: #e3e5df;
  --accent: #1e7d46;
  --accent-hover: #17663a;
  --accent-soft: #e6f4ea;
  --accent-text: #155d34;
  --hold: #8a5a00;
  --hold-soft: #fdf3dc;
  --error: #b42318;
  --error-soft: #fdecea;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 25, 0.04), 0 8px 24px rgba(20, 30, 25, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --pencil: #3a4a40;
  --sticky: #fff1a6;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

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

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10;
}

/* Header */

.site-header {
  padding: 18px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}

/* Buy banner */

.buy-banner {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-bottom: 1px solid #cfe8d7;
  font-weight: 600;
  font-size: 16px;
}

.buy-banner .wrap {
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Hero */

.hero {
  padding: 36px 0 56px;
}

.hero-grid {
  display: grid;
  gap: 40px;
}

.hero h1 {
  font-size: clamp(34px, 7vw, 54px);
  font-weight: 750;
  margin-bottom: 18px;
}

.lead {
  font-size: 20px;
  line-height: 1.5;
  color: #3a423d;
  max-width: 30em;
  margin-bottom: 28px;
}

/* Signup card */

.signup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid #cfd3cc;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 50px;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23525a55' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(30, 125, 70, 0.2);
  outline-offset: 0;
}

.field-row {
  display: grid;
  gap: 0 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  font: inherit;
  font-size: 18px;
  font-weight: 650;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  cursor: pointer;
  margin-top: 4px;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-hover);
  color: #fff;
}

.button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.form-promise {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
}

.form-note {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 10px;
}

.form-message {
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  padding: 10px 14px;
}

.form-message:empty {
  display: none;
}

.form-message.success {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.form-message.error {
  background: var(--error-soft);
  color: var(--error);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Email preview: styled like an inbox message */

.email-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 420px;
}

.email-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.email-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  flex: none;
}

.email-avatar svg {
  width: 24px;
  height: 24px;
}

.email-from-block {
  display: flex;
  flex: 1;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.email-from {
  font-weight: 700;
  font-size: 15px;
}

.email-to,
.email-time {
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
}

.email-body {
  padding: 16px 18px 18px;
}

.email-body p {
  font-size: 15px;
  line-height: 1.5;
  color: #3a423d;
  margin-bottom: 10px;
}

.email-body .email-subject {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.email-body .email-cta {
  font-size: 20px;
  font-weight: 750;
  color: var(--accent);
  margin: 4px 0 12px;
}

.email-button {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  padding: 8px 14px;
  margin: 0 0 12px;
}

.email-body .email-footer {
  font-size: 12px;
  color: #9aa19c;
  margin: 0;
}

/* Sections */

.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: clamp(26px, 4.5vw, 34px);
  margin-bottom: 14px;
  text-align: center;
}

.section-intro {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 36em;
  margin: 0 auto 36px;
  text-align: center;
}

/* Section tones: alternate backgrounds so each section reads as its own block */

.tone-white {
  background: var(--surface);
  border-top-color: var(--border);
}

.tone-tint {
  background: #eef3ec;
  border-top-color: #dfe8dc;
}

.tone-accent {
  background: var(--accent);
  border-top: 0;
  color: #fff;
}

.tone-accent h2 {
  color: #fff;
}

.tone-accent.cta-band p {
  color: rgba(255, 255, 255, 0.88);
}

.tone-accent .button {
  background: #fff;
  color: var(--accent-text);
}

.tone-accent .button:hover {
  background: #e6f4ea;
  color: var(--accent-text);
}

.tone-accent :focus-visible {
  outline-color: #fff;
}

/* Cards sitting on white sections need a touch more separation */

.cycle-chart {
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* Cycle chart */

#how h2 {
  margin-bottom: 36px;
}

.cycle-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.cycle-chart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 6px 4px;
}

.cycle-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-axis {
  stroke: #c9cdc5;
  stroke-width: 2;
}

.chart-line {
  fill: none;
  stroke: var(--text);
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-label {
  font-family: var(--font);
  font-size: 26px;
  fill: var(--text-muted);
}

.chart-label-strong {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  fill: var(--accent-text);
}

.chart-badge {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2.5;
}

.chart-badge-text {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
  fill: var(--accent-text);
}

.chart-callout {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  fill: #fff;
}

.chart-dot {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 4;
}

.chart-halo {
  fill: var(--accent);
  opacity: 0.18;
}

.cycle-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.cycle-points li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
}

.cycle-points strong {
  display: block;
  font-size: 19px;
  margin-bottom: 2px;
}

.cycle-points span {
  color: var(--text-muted);
}

/* Status */

.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
}

.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.status-row:last-child {
  border-bottom: 0;
}

.status-link {
  text-align: center;
  margin-top: 18px;
  font-size: 16px;
  font-weight: 600;
}

.city {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.city-note {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.35;
}

.city-note:empty {
  display: none;
}

.city-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
  background: var(--surface-muted);
  color: var(--text-muted);
}

.pill::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.pill.wait {
  background: var(--hold-soft);
  color: var(--hold);
  box-shadow: inset 0 0 0 1.5px #efd9a3;
}

.pill.buy {
  background: var(--accent);
  color: #fff;
}

.pill.buy::before {
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
  border-radius: 0;
}

.status-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--surface-muted);
  padding: 12px 24px;
}

/* Share row */

.share-title {
  font-weight: 700;
  color: var(--text) !important;
  margin: 22px 0 10px !important;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.share-btn {
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  color: var(--accent-text);
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
  cursor: pointer;
}

.share-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.share-btn-primary {
  color: #fff;
  background: var(--accent);
}

.share-btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* City pages */

.city-status-title {
  font-family: var(--hand);
  font-weight: 700;
  font-size: 30px;
  color: var(--pencil);
  margin: 0 0 12px;
  transform: rotate(-1deg);
}

.city-copy {
  max-width: 640px;
  text-align: center;
}

.city-copy p {
  font-size: 18px;
  color: #3a423d;
  margin: 0 auto 14px;
}

.city-links a {
  font-weight: 600;
}

.city-name a {
  color: inherit;
  text-decoration: none;
}

.city-name a:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.footer-cities {
  margin-bottom: 8px;
}

/* FAQ */

.faq {
  max-width: 720px;
  margin: 0 auto;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  font-size: 17px;
  padding: 18px 36px 18px 0;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  font-weight: 400;
  color: var(--text-muted);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  color: var(--text-muted);
  padding: 0 0 18px;
  max-width: 44em;
}

/* Bottom call to action */

.cta-band {
  text-align: center;
}

.cta-band p {
  color: var(--text-muted);
  margin: 0 auto 22px;
  max-width: 32em;
  font-size: 18px;
}

.cta-band .button {
  width: auto;
  padding: 12px 28px;
}

/* Footer */

.site-footer {
  border-top: 0;
  padding: 32px 0 48px;
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
}

.site-footer p + p {
  margin-top: 6px;
}

/* Simple pages (confirm, unsubscribe) */

.simple-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.simple-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 20px 64px;
}

.simple-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 28px;
  max-width: 460px;
  width: 100%;
  text-align: center;
}

.simple-card h1 {
  font-size: 28px;
  margin: 14px 0 10px;
}

.simple-card p {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.simple-card .button {
  margin-top: 14px;
}

.state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
}

.state-icon.ok {
  color: var(--accent);
}

.state-icon.bad {
  color: var(--error);
}

.state-icon.busy {
  color: var(--text-muted);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .state-icon.busy { animation: none; }
}

.hidden {
  display: none !important;
}

/* Below the two-column layout, centre the email preview and its note */
@media (max-width: 899px) {
  .hero-grid > div:last-child {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }

  .email-preview {
    max-width: none;
  }
}

/* Larger screens */

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: 1.4fr 1fr;
  }

  .signup {
    padding: 26px;
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 40px 0 72px;
  }

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 56px;
  }

  .cycle-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
  }

  .section {
    padding: 72px 0;
  }
}

/* ------------------------------------------------------------------ */
/* Scratchpad style: handwriting for headings and notes, doodles       */
/* ------------------------------------------------------------------ */

/* One dot grid across every section */
body,
.tone-white,
.tone-tint,
.tone-accent {
  background-size: 24px 24px;
}

body {
  background-image: radial-gradient(#d8dcd3 1.1px, transparent 1.2px);
}

.tone-white {
  background-image: radial-gradient(#dfe2da 1.1px, transparent 1.2px);
}

.tone-tint {
  background-image: radial-gradient(#cdd8c9 1.1px, transparent 1.2px);
}

.tone-accent {
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.1px, transparent 1.2px);
}

.section h2,
.cta-band h2 {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 48px);
  letter-spacing: 0;
  line-height: 1.05;
}

.mark-underline {
  white-space: nowrap;
}

.preview-label {
  position: relative;
  font-family: var(--hand);
  font-size: 26px;
  font-weight: 700;
  color: var(--pencil);
  margin-bottom: 14px;
  padding-right: 64px;
  display: inline-block;
  transform: rotate(-1.5deg);
}

.doodle-arrow {
  width: 56px;
  height: 46px;
  fill: none;
  stroke: var(--pencil);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview-label .doodle-arrow {
  position: absolute;
  right: 0;
  top: 12px;
}

.sticky-note {
  position: relative;
  z-index: 2;
  width: fit-content;
  margin: -26px -10px 0 auto;
  padding: 16px 28px 18px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.15;
  color: var(--text);
  background: var(--sticky);
  border-radius: 3px 3px 18px 3px;
  box-shadow: 0 10px 22px rgba(20, 30, 25, 0.14), 0 2px 4px rgba(20, 30, 25, 0.08);
  transform: rotate(2deg);
}

.sticky-note::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 90px;
  height: 24px;
  margin-left: -45px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transform: rotate(-3deg);
}

.sticky-note strong {
  font-weight: 700;
}

.margin-note {
  font-family: var(--hand);
  font-size: 24px;
  font-weight: 700;
  color: var(--pencil);
  line-height: 1;
}

/* Illustrative chart and step numbers in handwriting */

.chart-callout,
.chart-badge-text {
  font-family: var(--hand);
  font-weight: 700;
}

.chart-callout {
  font-size: 31px;
}

.chart-badge-text {
  font-size: 26px;
}

/* Hand-drawn number circles, drawn in SVG so digits centre the same in every browser */
.num {
  display: block;
  width: 40px;
  height: 40px;
}

.num svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.num-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
}

.num-digit {
  font-family: var(--hand);
  font-size: 26px;
  font-weight: 700;
  fill: var(--accent-text);
  text-anchor: middle;
  dominant-baseline: central;
}

.num.good .num-ring {
  fill: var(--accent);
}

.num.good .num-digit {
  fill: #fff;
}




/* Status chart hint */

/* Closing call to action */

.cta-doodle-wrap {
  position: relative;
  display: inline-block;
}

.cta-note {
  position: absolute;
  left: -238px;
  top: -4px;
  color: #fff;
  transform: rotate(-6deg);
  white-space: nowrap;
}

.cta-arrow {
  position: absolute;
  left: -64px;
  top: -2px;
  stroke: #fff;
}

@media (max-width: 639px) {
  .cta-note,
  .cta-arrow {
    display: none;
  }
}

/* A little life on buttons */

.button {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s;
}

.button:hover {
  transform: translateY(-2px) rotate(-0.5deg);
  box-shadow: 0 8px 18px rgba(30, 125, 70, 0.28);
}

.button:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
  .button:hover { transform: none; }
}
