/* =========================================================
   Cofficianado — styles
   Warm, café-inspired palette. Fraunces (display) + Inter.
   ========================================================= */

:root {
  --espresso: #2a1a12;
  --roast: #4a2c1a;
  --coffee: #6b4226;
  --caramel: #c68b59;
  --caramel-deep: #b3743f;
  --crema: #e9d7be;
  --latte: #f3e9da;
  --cream: #fbf6ee;
  --paper: #ffffff;
  --leaf: #6f7d55;
  --ink: #2a1a12;
  --muted: #7a6a5c;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 10px rgba(42, 26, 18, 0.08);
  --shadow: 0 18px 50px -18px rgba(42, 26, 18, 0.35);
  --shadow-soft: 0 12px 40px -20px rgba(42, 26, 18, 0.45);
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--caramel-deep);
  margin-bottom: 0.9rem;
}
.eyebrow.on-dark { color: var(--crema); }

.accent { color: var(--caramel-deep); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--espresso);
  color: var(--cream);
  padding: 0.6rem 1rem;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--caramel); outline-offset: 3px; }

.btn-app {
  background: var(--espresso);
  color: var(--cream);
  box-shadow: var(--shadow-soft);
}
.btn-app:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -18px rgba(42, 26, 18, 0.6); }
.btn-app .apple-logo { width: 22px; height: 22px; }
.btn-app-text { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.btn-app-text small { font-size: 0.64rem; font-weight: 500; opacity: 0.85; letter-spacing: 0.02em; }
.btn-app-text strong { font-size: 1.05rem; font-weight: 600; }

.btn-sm { padding: 0.55rem 1rem; }
.btn-sm .apple-logo { width: 18px; height: 18px; }

.btn-ghost {
  background: transparent;
  color: var(--roast);
  border: 1.5px solid rgba(74, 44, 26, 0.25);
}
.btn-ghost:hover { background: var(--latte); border-color: transparent; transform: translateY(-2px); }

.btn-on-dark { background: var(--cream); color: var(--espresso); }
.btn-on-dark:hover { background: #fff; }

.btn-outline {
  background: var(--paper);
  color: var(--roast);
  border: 1.5px solid var(--crema);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.btn-outline:hover { transform: translateY(-2px); border-color: var(--caramel); color: var(--espresso); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 238, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(74, 44, 26, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; }
.brand-mark { font-size: 1.35rem; }
.brand-name { font-family: "Fraunces", serif; font-size: 1.25rem; font-weight: 600; }

.nav {
  display: flex;
  gap: 1.7rem;
  margin-left: auto;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a { color: var(--muted); transition: color 0.18s; }
.nav a:hover { color: var(--espresso); }
.header-inner .btn-app { margin-left: 0; }
.nav + .btn-app { margin-left: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(198, 139, 89, 0.22), transparent 60%),
    radial-gradient(900px 600px at -5% 110%, rgba(111, 125, 85, 0.14), transparent 55%),
    var(--cream);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
.hero h1 {
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  margin-bottom: 1.2rem;
  overflow-wrap: break-word;
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
  max-width: 34ch;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.hero-note { margin-top: 1.4rem; font-size: 0.9rem; color: var(--muted); }

/* ---------- Hero art: phone mockup ---------- */
.hero-art { position: relative; display: flex; justify-content: center; }

.phone {
  position: relative;
  z-index: 2;
  width: 290px;
  height: 590px;
  background: #1c120c;
  border-radius: 46px;
  padding: 13px;
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}
.phone-notch {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 26px;
  background: #1c120c;
  border-radius: 0 0 16px 16px;
  z-index: 3;
}
.phone-screen {
  height: 100%;
  border-radius: 34px;
  background: linear-gradient(180deg, var(--latte), var(--cream));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.app-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.3rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--roast);
}
.app-signal { letter-spacing: 1px; font-size: 0.6rem; }
.app-header { padding: 0.6rem 1.3rem 0.9rem; }
.app-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--caramel-deep);
}
.app-header h3 { font-size: 1.5rem; }

.app-list {
  list-style: none;
  margin: 0;
  padding: 0 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}
.app-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--paper);
  border-radius: 16px;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 6px 16px -10px rgba(42, 26, 18, 0.4);
}
.app-card.fav { box-shadow: 0 8px 20px -8px rgba(198, 139, 89, 0.6); }
.app-thumb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.t1 { background: var(--crema); }
.t2 { background: #dfe4d0; }
.t3 { background: #ecd9c9; }
.app-meta { display: flex; flex-direction: column; line-height: 1.25; }
.app-meta strong { font-size: 0.92rem; }
.app-meta span { font-size: 0.7rem; color: var(--muted); }
.heart { margin-left: auto; font-size: 1.15rem; color: #c9bcae; }
.heart.on { color: #d6604d; }

.app-tabbar {
  display: flex;
  justify-content: space-around;
  padding: 0.8rem 0.5rem 1.1rem;
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(74, 44, 26, 0.08);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.tab.active { color: var(--caramel-deep); }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  z-index: 1;
}
.blob-a {
  width: 230px; height: 230px;
  background: radial-gradient(circle at 30% 30%, rgba(198, 139, 89, 0.5), transparent 70%);
  top: -20px; right: 0;
}
.blob-b {
  width: 200px; height: 200px;
  background: radial-gradient(circle at 70% 70%, rgba(111, 125, 85, 0.4), transparent 70%);
  bottom: -10px; left: 0;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-head { max-width: 60ch; margin-bottom: 3rem; }
.section-head h2, .support h2, .local h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 0.9rem; }
.section-sub { color: var(--muted); font-size: 1.08rem; max-width: 52ch; }

/* ---------- Features grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.card {
  background: var(--paper);
  border: 1px solid rgba(74, 44, 26, 0.07);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 1.5rem;
  background: var(--latte);
  border-radius: 14px;
  margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.97rem; }

/* ---------- Local band ---------- */
.local {
  background:
    radial-gradient(800px 400px at 90% 10%, rgba(198, 139, 89, 0.25), transparent 60%),
    linear-gradient(160deg, var(--roast), var(--espresso));
  color: var(--cream);
}
.local-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.local-copy { color: var(--crema); font-size: 1.1rem; max-width: 46ch; margin-bottom: 2rem; }
.stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.2rem;
}
.stats li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-top: 1px solid rgba(233, 215, 190, 0.25);
  padding-top: 1.2rem;
}
.stats strong {
  font-family: "Fraunces", serif;
  font-size: 2.6rem;
  font-weight: 600;
  color: #fff;
  min-width: 2.6ch;
}
.stats span { color: var(--crema); }

/* ---------- Support ---------- */
.support { background: var(--latte); }
.support-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow-sm);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--espresso);
  color: var(--crema);
  padding-block: 3rem 1.6rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(233, 215, 190, 0.15);
}
.footer-brand .brand-name { color: var(--cream); }
.footer-brand { display: flex; flex-direction: column; gap: 0.3rem; }
.footer-brand .brand-mark { font-size: 1.5rem; }
.footer-tagline { color: var(--crema); opacity: 0.75; font-size: 0.92rem; margin-top: 0.3rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; }
.footer-nav a { color: var(--crema); opacity: 0.85; font-size: 0.95rem; transition: opacity 0.18s; }
.footer-nav a:hover { opacity: 1; }
.footer-bottom { padding-top: 1.4rem; font-size: 0.85rem; opacity: 0.7; }

/* ---------- Privacy / content page ---------- */
.page { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-narrow { max-width: 760px; }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 0.6rem; }
.page .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 2.5rem; }
.prose h2 { font-size: 1.5rem; margin: 2.4rem 0 0.8rem; }
.prose p { color: #4a3a30; margin-bottom: 1rem; }
.prose a { color: var(--caramel-deep); text-decoration: underline; text-underline-offset: 3px; }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--caramel-deep); font-weight: 600; margin-bottom: 1.5rem; }
.back-link:hover { color: var(--espresso); }

/* ---------- Reveal animation ----------
   Progressive enhancement: content is visible by default. Only when JS adds
   the `js` class to <html> do elements start hidden and animate in on scroll,
   so the page is never blank if JS is disabled or slow. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 2; }
  .hero-art { order: 1; }
  .lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .local-inner { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav { display: none; }
  .grid { grid-template-columns: 1fr; }
  .support-inner { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; }
}

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