/* Grublist marketing site — "Fresh Market" tokens, kept in sync with
   src/global.css / tailwind.config.js in the app. */

:root {
  --bg: #fdfbf6;
  --surface: #ffffff;
  --raised: #f3ecdf;
  --border: #e8dfd0;
  --ink: #23180f;
  --ink-muted: #6f6353;
  --ink-faint: #a89a86;
  --pine: #323f29; /* logo green — display headings */
  --primary: #c8401d;
  --primary-deep: #a83518;
  --primary-soft: #fbe4db;
  --on-primary: #fffaf5;
  --leaf: #2f7038;
  --leaf-soft: #e2efdd;
  --lemon: #f2b13c;

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Outfit', 'Avenir Next', sans-serif;

  --container: 1080px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow-soft: 0 2px 6px rgb(35 24 15 / 0.05), 0 18px 48px rgb(35 24 15 / 0.09);
  --shadow-card: 0 1px 3px rgb(35 24 15 / 0.05), 0 10px 28px rgb(35 24 15 / 0.07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Faint paper grain so the cream doesn't read flat */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.14 0 0 0 0 0.09 0 0 0 0 0.06 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--pine);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.7rem, 6.4vw, 4.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 600;
  text-align: center;
}

.accent {
  color: var(--primary);
  font-style: italic;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-muted);
  max-width: 44ch;
  margin: 1.4rem 0 1.8rem;
}

.micro {
  color: var(--ink-faint);
  font-size: 0.92rem;
  margin: 0.9rem 0 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  padding: 0.95em 1.6em;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgb(200 64 29 / 0.25), 0 10px 24px rgb(200 64 29 / 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn:hover {
  background: var(--primary-deep);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgb(200 64 29 / 0.28), 0 16px 32px rgb(200 64 29 / 0.26);
}

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

.btn-small { padding: 0.62em 1.15em; font-size: 0.95rem; }

.apple { width: 1em; height: 1.15em; flex: none; }

/* ---------- Header ---------- */

.site-header { padding: 22px 0 6px; position: relative; z-index: 2; }

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark { height: 44px; width: auto; }
.brand-wordmark { height: 30px; width: auto; }
.brand-lockup { height: 46px; width: auto; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.link-signin {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: color 140ms ease;
}

.link-signin:hover { color: var(--primary); }

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 30px;
  position: relative;
  /* Clip horizontally to contain the glow (no sideways scroll), but let the
     phone's drop-shadow bleed down into the next section instead of being
     hard-cut at the hero's bottom edge. */
  overflow-x: clip;
  overflow-y: visible;
}

/* Soft warm glow behind the phone */
.hero::after {
  content: '';
  position: absolute;
  right: -10%;
  top: 0;
  width: 55%;
  height: 100%;
  background: radial-gradient(closest-side, rgb(242 177 60 / 0.16), transparent 75%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.hero-shot { display: flex; justify-content: center; }

.hero-shot img {
  width: min(340px, 80%);
  filter: drop-shadow(0 30px 50px rgb(35 24 15 / 0.22));
}

/* ---------- Steps ---------- */

.steps { padding: 84px 0 40px; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
  margin-top: 52px;
  text-align: center;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--raised);
  border: 1.5px solid var(--border);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.step-art {
  width: min(210px, 100%);
  margin: 18px auto 6px;
  display: block;
}

.step h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.step p {
  color: var(--ink-muted);
  margin: 0 auto;
  max-width: 30ch;
}

/* ---------- Cross-device band ---------- */

.band-wrap { padding: 56px 0; }

.band {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 40px;
}

.band-copy h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.9rem;
}

.band-copy p { color: var(--ink-muted); margin: 0 0 0.9rem; }

.band-visual {
  position: relative;
  padding-bottom: 26px;
}

.laptop { width: 100%; }

.laptop-screen {
  background: #fff;
  border: 10px solid #2c2622;
  border-bottom-width: 12px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.laptop-screen img { width: 100%; }

.laptop-base {
  height: 13px;
  background: linear-gradient(#e6e0d6, #cfc8bb);
  border-radius: 0 0 14px 14px;
  width: 112%;
  margin-left: -6%;
  box-shadow: 0 10px 22px rgb(35 24 15 / 0.15);
}

.band-phone {
  position: absolute;
  right: -20px;
  bottom: -10px;
  width: 32%;
  filter: drop-shadow(0 16px 28px rgb(35 24 15 / 0.28));
}

/* ---------- Feature cards ---------- */

.features { padding: 56px 0 30px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

/* Alternate faded-green and warm-tomato card tints (soft) */
.card:nth-child(odd) {
  background: #eef6ea;
  border-color: #e0efd9;
}

.card:nth-child(even) {
  background: #fdefe9;
  border-color: #f7ddd2;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 3px 6px rgb(35 24 15 / 0.06), 0 20px 40px rgb(35 24 15 / 0.11);
}

.card-art {
  background: var(--surface);
  border: 1px solid rgb(35 24 15 / 0.06);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  /* Fixed height so every card's heading starts at the same line */
  height: 150px;
}

.card-art img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Wide strip crops (e.g. a single list row) sit centered instead of zoomed */
.card-art-contain { padding: 14px; }
.card-art-contain img { object-fit: contain; }

/* Frameless art: let the illustration breathe on the card tint itself */
.card-art-bare {
  background: none;
  border: none;
  overflow: visible;
}

.card-art-bare img { width: auto; height: 100%; object-fit: contain; }

.card-art-svg { background: var(--bg); padding: 8px 12px; }
.card-art-svg svg { width: 100%; height: 100%; }

.card h3 {
  font-size: 1.12rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.card p { color: var(--ink-muted); font-size: 0.94rem; margin: 0; }

/* ---------- Closing ---------- */

.closing-wrap { padding: 64px 0 84px; }

.closing {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.closing-mark { height: 168px; width: auto; }

.closing h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  margin-bottom: 1.2rem;
}

.closing-basket { width: clamp(150px, 20vw, 240px); }

/* ---------- Legal pages (privacy / terms) ---------- */

.legal {
  max-width: 720px;
  margin-inline: auto;
  padding: 40px 0 72px;
  position: relative;
  z-index: 2;
}

.legal h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.legal .updated {
  color: var(--ink-faint);
  font-size: 0.95rem;
  margin: 0 0 2rem;
}

.legal h2 {
  font-size: 1.32rem;
  font-weight: 600;
  margin: 2.4rem 0 0.7rem;
}

.legal p,
.legal li {
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.legal ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.legal li { margin-bottom: 0.5rem; }

.legal a { color: var(--primary); text-decoration: none; }
.legal a:hover { text-decoration: underline; }

.legal .back {
  display: inline-block;
  margin-top: 2.4rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.legal .back:hover { text-decoration: underline; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 34px;
  position: relative;
  z-index: 2;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-lockup { height: 30px; width: auto; }

.footer-tagline {
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin-left: 8px;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  color: var(--ink-faint);
  font-size: 0.92rem;
}

.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--primary); }

/* ---------- Motion ---------- */

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.load-up {
  animation: rise-in 700ms cubic-bezier(0.2, 0.65, 0.25, 1) both;
  animation-delay: var(--d, 0ms);
}

/* Scroll reveals only apply when JS has confirmed it's running (html.js),
   so no-JS visitors and crawlers see everything. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(0.2, 0.65, 0.25, 1),
    transform 700ms cubic-bezier(0.2, 0.65, 0.25, 1);
  transition-delay: var(--d, 0ms);
}

.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .load-up { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .closing { grid-template-columns: auto 1fr; }
  .closing-basket { display: none; }
}

@media (max-width: 760px) {
  .hero { padding-top: 36px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .lede { margin-inline: auto; }
  .hero-shot img { width: min(300px, 74%); }
  .steps-grid { grid-template-columns: 1fr; gap: 40px; }
  .band { grid-template-columns: 1fr; }
  .band-phone { right: 4px; }
}

@media (max-width: 600px) {
  /* Header: shrink the lockup so Sign in + CTA have room */
  .brand-lockup { height: 38px; }
  .header-actions { gap: 14px; }
}

@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
  .closing { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .closing-mark { height: 84px; }
  .footer-row { flex-direction: column; }
}
