/* Tidy Haven website: blue, beige and cream with a gingham check accent. */

:root {
  --cream: #fbf6ec;
  --cream-deep: #f4ead8;
  --beige: #e8d9bf;
  --sand: #c9b08a;
  --blue: #3d6a9c;
  --blue-dark: #284a72;
  --blue-soft: #a8c2de;
  --blue-mist: #dde8f3;
  --ink: #23324a;
  --ink-soft: #55627a;
  --roof: #c4573f;
  --leaf: #5f9a5a;
  --card: #fffdf8;
  --line: #e2d4bb;
  --shadow: 0 10px 30px rgba(40, 60, 90, 0.12);
  --radius: 18px;
  --wrap: 1120px;
  /* Faint paper grain, drawn with an inline SVG filter. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.18 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Gingham: two semi-transparent stripe layers crossing. */
  --check: repeating-linear-gradient(0deg, rgba(61, 106, 156, 0.13) 0 22px, transparent 22px 44px),
           repeating-linear-gradient(90deg, rgba(61, 106, 156, 0.13) 0 22px, transparent 22px 44px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream) var(--grain);
}

img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.15; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
/* Grid children may shrink below their content's natural width (no sideways scroll on phones). */
.wrap > *, .hero-grid > *, .csv-grid > *, .get-grid > * { min-width: 0; }
html, body { overflow-x: clip; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.eyebrow {
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.78rem; color: var(--blue); margin-bottom: 0.6em;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }
.small { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.8em; }
.loading { color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  padding: 0.8em 1.4em; border-radius: 999px; border: 2px solid transparent;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(61, 106, 156, 0.3); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: var(--card); }
.btn-ghost { color: var(--ink); background: transparent; border-color: var(--sand); }
.btn-small { padding: 0.45em 1em; font-size: 0.92rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 0.55em; text-decoration: none; color: var(--ink); font-family: "Fraunces", serif; font-weight: 700; font-size: 1.3rem; }
.nav-links { display: flex; align-items: center; gap: 1.6em; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 700; }
.nav-links a:not(.btn):hover { color: var(--blue); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 3px; margin: 4px 0; background: var(--ink); border-radius: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 8px 20px 18px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li a:not(.btn) { display: block; padding: 12px 0; border-bottom: 1px dashed var(--line); }
  .nav-links li .btn { margin-top: 14px; width: 100%; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 64px 0 80px;
  background:
    radial-gradient(ellipse at 85% 20%, var(--blue-mist) 0, transparent 55%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
}
.hero::after {
  /* Gingham strip along the bottom edge, like a tablecloth hem. */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background: var(--check), var(--card);
  border-top: 2px solid var(--blue-soft);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--blue); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; font-weight: 700; color: var(--ink-soft); }
.hero-points li::before { content: "✓ "; color: var(--leaf); }

.hero-art { position: relative; display: flex; justify-content: center; padding: 10px 0 30px; }
.phone {
  width: 290px; padding: 12px; border-radius: 38px;
  background: var(--ink); box-shadow: 0 30px 60px rgba(35, 50, 74, 0.28);
  transform: rotate(3deg);
}
.phone-screen { background: var(--cream); border-radius: 28px; padding: 22px 16px 18px; min-height: 480px; }
.phone-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 0.85rem; margin-bottom: 14px; }
.phone-day { font-family: "Fraunces", serif; font-size: 1.2rem; }
.phone-streak { background: #fdebd3; color: #9a4b12; padding: 3px 9px; border-radius: 999px; }
.phone-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin: 14px 0 6px; }
.chore-card { display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.chore-card strong { display: block; font-size: 0.92rem; }
.chore-card small { color: var(--ink-soft); font-size: 0.78rem; }
.chore-icon { font-size: 1.5rem; width: 40px; height: 40px; display: grid; place-items: center; background: var(--blue-mist); border-radius: 12px; flex-shrink: 0; }
.chore-drawn { border: 2px solid var(--blue); background: linear-gradient(0deg, var(--card), var(--blue-mist)); }
.chore-done { opacity: 0.75; }
.phone-points { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-weight: 800; }
.pill { background: var(--blue); color: #fff; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; }
.hero-logo {
  position: absolute; left: -10px; bottom: 0; width: 170px; height: auto;
  filter: drop-shadow(0 12px 20px rgba(35, 50, 74, 0.2));
}

@media (max-width: 860px) {
  .hero { padding: 40px 0 70px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-logo { display: none; } /* already in the header */
}
.phone-streak, .phone-points span, .pill { white-space: nowrap; }
@media (max-width: 420px) {
  .phone { width: 280px; padding: 10px; transform: rotate(2deg); }
  .phone-screen { padding: 18px 12px 14px; min-height: 0; }
  .phone-streak { font-size: 0.75rem; }
}

/* Sections */
.section { padding: 88px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-sub { color: var(--ink-soft); }
.section-cream { background: var(--cream-deep) var(--grain); border-block: 1px solid var(--line); }
.section-check {
  background: var(--check), var(--cream);
  border-block: 1px solid var(--line);
}
@media (max-width: 600px) { .section { padding: 64px 0; } }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: 0 2px 0 var(--beige);
}
.feature p { color: var(--ink-soft); margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; font-size: 1.6rem; background: var(--blue-mist); border-radius: 14px; margin-bottom: 14px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* Plans */
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; max-width: 860px; margin: 0 auto; }
.plan {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan-featured { border: 2px solid var(--blue); }
.price { font-family: "Fraunces", serif; font-size: 2rem; font-weight: 700; color: var(--blue); margin: -0.2em 0 0.4em; }
.ribbon { position: absolute; top: 18px; right: 18px; background: var(--roof); color: #fff; font-weight: 800; font-size: 0.75rem; padding: 4px 12px; border-radius: 999px; }
.ticks { list-style: none; padding: 0; margin: 0 0 26px; }
.ticks li { padding: 6px 0 6px 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--leaf); font-weight: 800; }
@media (max-width: 700px) { .plan-grid { grid-template-columns: 1fr; } }

/* Get the app */
.get-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.store-badges { display: flex; flex-direction: column; gap: 12px; }
.badge-soon { background: var(--ink); color: var(--cream); border-radius: 14px; padding: 14px 20px; font-weight: 800; text-align: center; }
@media (max-width: 760px) { .get-grid { grid-template-columns: 1fr; } }

/* Tutorials */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.video-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; background: var(--check), var(--blue-mist);
  display: grid; place-items: center; border: 0; padding: 0; width: 100%; cursor: pointer;
}
.video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255, 253, 248, 0.95); color: var(--blue); font-size: 1.5rem;
  display: grid; place-items: center; box-shadow: var(--shadow); padding-left: 4px;
}
.video-soon { cursor: default; }
.video-soon .play { background: var(--card); color: var(--ink-soft); font-size: 0.85rem; font-weight: 800; width: auto; height: auto; border-radius: 999px; padding: 8px 16px; }
.video-body { padding: 18px 20px 22px; }
.video-body p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }
.video-meta { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue); margin-bottom: 4px; }
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .video-grid { grid-template-columns: 1fr; } }

/* CSV */
.csv-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.csv-table-wrap { overflow-x: auto; }
.csv-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 0.95rem; }
.csv-table caption { text-align: left; font-weight: 800; padding-bottom: 10px; }
.csv-table th, .csv-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.csv-table th { background: var(--blue); color: #fff; }
.csv-table td:first-child { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--blue-dark); white-space: nowrap; }
.csv-table tr:last-child td { border-bottom: 0; }
.csv-table-gap { margin-top: 28px; }
.download-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 860px) { .csv-grid { grid-template-columns: 1fr; } }

/* News */
.news-list { display: grid; gap: 18px; max-width: 760px; margin: 0 auto; }
.news-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; box-shadow: 0 2px 0 var(--beige); }
.news-item h3 { margin-bottom: 0.3em; }
.news-item p { margin: 0; color: var(--ink-soft); }
.news-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 0.85rem; color: var(--ink-soft); font-weight: 700; }
.tag { padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.tag-building { background: #fdebd3; color: #9a4b12; }
.tag-planned { background: var(--blue-mist); color: var(--blue-dark); }
.tag-released { background: #dcefd9; color: #2f6a2b; }
.tag-news { background: var(--beige); color: var(--ink); }

/* Account */
.account-card {
  display: flex; gap: 32px; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 40px; box-shadow: var(--shadow); max-width: 960px;
}
.account-card p:last-child { margin: 0; color: var(--ink-soft); }
.account-card .btn { flex-shrink: 0; }
@media (max-width: 760px) { .account-card { flex-direction: column; align-items: flex-start; padding: 28px 24px; } }

/* Footer */
.site-footer { background: var(--ink); color: var(--beige); padding: 32px 0; }
.site-footer .brand { color: var(--cream); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.footer-grid p { margin: 0; font-size: 0.92rem; }
