:root {
  --wine: #6e2334;
  --wine-600: #5a1c2a;
  --wine-700: #45141f;
  --wine-tint: #f5eaed;
  --bg: #fbf8f7;
  --card: #ffffff;
  --ink: #221417;
  --body: #5b5157;
  --muted: #8c8084;
  --line: #ece2e4;
  --shadow: 0 1px 2px rgba(34, 20, 23, 0.04), 0 10px 30px rgba(34, 20, 23, 0.06);
  --shadow-hover: 0 2px 4px rgba(34, 20, 23, 0.05), 0 18px 40px rgba(34, 20, 23, 0.10);
  --maxw: 980px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--wine); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; }
.serif { font-family: 'Fraunces', Georgia, serif; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; font-family: inherit; font-size: 15px; font-weight: 600;
  color: #fff; background: var(--wine); border: none; border-radius: 10px;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--wine-600); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: transparent; color: var(--wine); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--wine-tint); }

/* ── Top nav ── */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 1px solid var(--line);
  background: rgba(251,248,247,0.85); backdrop-filter: saturate(140%) blur(8px);
}
.nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--wine); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 16px;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--body); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { color: var(--wine); }
.nav-links .btn { padding: 8px 14px; color: #fff; }
.nav-links .btn:hover { color: #fff; }
@media (max-width: 640px) { .nav-links a:not(.btn) { display: none; } }

/* ── Hero ── */
.hero { padding: 72px 0 44px; }
.eyebrow { color: var(--wine); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(32px, 5.5vw, 50px); margin: 14px 0 0; letter-spacing: -0.01em; }
.hero .tag { font-size: clamp(17px, 2.4vw, 22px); color: var(--wine); margin-top: 12px; font-weight: 500; }
.hero p { max-width: 700px; margin: 22px 0 0; font-size: 16.5px; }
.hero .cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Sections ── */
section { padding: 30px 0; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 20px; }
.section-head h2 { font-size: 14px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.section-head .rule { flex: 1; height: 1px; background: var(--line); }
.prose { max-width: 720px; font-size: 16.5px; }
.prose h3 { font-size: 24px; margin-bottom: 10px; }

/* ── App cards ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.appcard {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.appcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #e2d2d6; }
.appcard h3 { font-size: 20px; }
.appcard .blurb { margin: 9px 0 14px; font-size: 14.5px; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip { font-size: 11.5px; font-weight: 600; color: var(--wine-700); background: var(--wine-tint); border-radius: 999px; padding: 4px 10px; }
.open {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: #fff; background: var(--wine);
  text-decoration: none; padding: 9px 15px; border-radius: 10px; transition: background .15s;
}
.open:hover { background: var(--wine-600); }
.group-label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 6px 0 12px; }

/* ── Footer ── */
footer { margin-top: 40px; padding: 28px 0 48px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
footer a { font-weight: 600; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Gated demo page ── */
#gate {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--wine-tint), transparent 60%), var(--bg);
}
.gate-card {
  width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 34px 30px; box-shadow: var(--shadow); text-align: center;
}
.gate-card .mark { width: 54px; height: 54px; font-size: 24px; border-radius: 14px; margin: 0 auto 16px; }
.gate-card h1 { font-size: 20px; margin-bottom: 4px; }
.gate-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.field { text-align: left; margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.field input {
  width: 100%; padding: 11px 13px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(110,35,52,0.12); }
.gate-card .btn { width: 100%; margin-top: 6px; }
.gate-error { color: var(--wine); font-size: 13px; min-height: 18px; margin-top: 12px; }
.gate-foot { margin-top: 20px; font-size: 12px; color: var(--muted); }
.gate-note {
  background: var(--wine-tint);
  border: 1px solid rgba(110, 35, 52, 0.18);
  border-left: 3px solid var(--wine);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  text-align: left;
}
.gate-note strong { color: var(--wine); }
.gate-note a { color: var(--wine); font-weight: 600; text-decoration: underline; word-break: break-word; }
.gate-back { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--muted); text-decoration: none; }
.gate-back:hover { color: var(--wine); text-decoration: underline; }
.note {
  margin-top: 24px; padding: 14px 16px; border-radius: 12px;
  background: var(--wine-tint); border: 1px solid #ecd9df; color: var(--wine-700); font-size: 14px;
}
#demo-app { display: none; }

@media (max-width: 560px) {
  .hero { padding: 48px 0 30px; }
  .grid { grid-template-columns: 1fr; }
}

/* ── Home: strengths + CTA band ── */
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.strength {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; box-shadow: var(--shadow);
}
.strength .diamond { color: var(--wine); font-size: 18px; margin-bottom: 10px; }
.strength h3 { font-size: 19px; margin-bottom: 8px; }
.strength p { font-size: 14.5px; margin: 0; }
.band {
  background: var(--wine); color: #fff; border-radius: 20px; padding: 40px 36px; text-align: center;
}
.band h2 { color: #fff; font-size: clamp(22px, 3.5vw, 30px); }
.band p { color: rgba(255,255,255,0.88); max-width: 620px; margin: 12px auto 0; font-size: 16px; }
.band .btn { background: #fff; color: var(--wine); margin-top: 22px; }
.band .btn:hover { background: #f3e7ea; }

/* ── Content pages ── */
.page-hero { padding: 56px 0 10px; }
.page-hero h1 { font-size: clamp(28px, 4.5vw, 42px); }
.page-hero .lede { font-size: clamp(16px, 2.2vw, 19px); color: var(--wine); max-width: 720px; margin: 12px 0 0; font-weight: 500; }
.content { max-width: 760px; padding: 24px 0 8px; font-size: 16px; }
.content h2 { font-family: 'Fraunces', serif; font-size: 26px; margin: 38px 0 12px; }
.content h3 { font-size: 19px; margin: 26px 0 8px; color: var(--ink); }
.content h4 { font-size: 16px; margin: 20px 0 6px; color: var(--wine-700); }
.content p { margin: 12px 0; }
.content ul, .content ol { margin: 12px 0; padding-left: 22px; }
.content li { margin: 6px 0; }
.content a { font-weight: 600; }
.content strong { color: var(--ink); }
.content hr { border: none; border-top: 1px solid var(--line); margin: 34px 0; }
.content blockquote { margin: 16px 0; padding: 10px 16px; border-left: 3px solid var(--wine); background: var(--wine-tint); border-radius: 0 10px 10px 0; color: var(--wine-700); }
.content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--wine-tint); padding: 2px 6px; border-radius: 6px; color: var(--wine-700); }
.content pre { background: #241417; color: #f3e7ea; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 13px; line-height: 1.5; margin: 16px 0; }
.content pre code { background: none; color: inherit; padding: 0; }
.content table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14.5px; }
.content th, .content td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.content th { color: var(--ink); font-weight: 600; }

/* ── Project cards on the Projects page ── */
.project {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; box-shadow: var(--shadow); text-decoration: none; margin: 14px 0;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.project:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #e2d2d6; }
.project h3 { font-family: 'Fraunces', serif; font-size: 22px; }
.project .kicker { color: var(--wine); font-weight: 600; font-size: 14px; margin: 6px 0; }
.project p { color: var(--body); font-size: 14.5px; margin: 8px 0 0; }
.project .more { color: var(--wine); font-weight: 600; font-size: 14px; margin-top: 12px; display: inline-block; }

/* ── Portfolio: engagement case-study cards (alternating burgundy / cream) ── */
.case { border-radius: 22px; padding: 32px 30px; margin: 24px 0; background: var(--wine); }
.case-title { text-align: center; color: #fff; font-size: clamp(22px, 3.6vw, 32px); margin-bottom: 22px; }
.case-section { background: #f5efec; border-radius: 14px; padding: 18px 24px; margin: 14px 0; }
.case-section h3 { font-family: 'Fraunces', serif; font-style: italic; font-size: 20px; color: var(--wine); text-decoration: underline; text-underline-offset: 4px; margin-bottom: 8px; }
.case-section p { margin: 0; text-align: center; color: var(--wine-700); font-size: 15px; line-height: 1.6; }
.case-foot { text-align: center; margin-top: 18px; font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.82); }
/* Alternating variant: cream card with burgundy inner boxes */
.case.alt { background: #f5efec; }
.case.alt .case-title { color: var(--wine); }
.case.alt .case-section { background: var(--wine); }
.case.alt .case-section h3 { color: #fff; }
.case.alt .case-section p { color: rgba(255,255,255,0.92); }
.case.alt .case-foot { color: var(--wine); }
/* Closing statement in the CTA band */
.band .quote { font-family: 'Fraunces', serif; font-size: clamp(18px, 2.6vw, 23px); line-height: 1.5; color: #fff; max-width: 820px; margin: 0 auto; }
