/* ──────────────────────────────────────────────────────────────────────────
 *  Bacchat landing page
 *  Styled after adityajyoti.com — gruvbox-lite palette, Excalifont
 *  handwriting, hand-drawn asymmetric border-radius corners on every card.
 * ────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Excalifont";
  src: url("./fonts/Excalifont-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #fbf1c7;
  --foreground: #1d2021;
  --foreground-soft: #1d2021cc;
  --muted: #1d20218a;
  --purple: #d3869b;
  --blue: #83a598;
  --aqua: #8ec07c;
  --yellow: #fabd2f;
  --green: #b8bb26;
  --red: #fb4934;
  --shadow-offset: 4px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Excalifont", "Patrick Hand", "Comic Neue", system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  font-size: 18px;
}

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

a.inline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ──────────────── HAND-DRAWN CORNER VARIANTS ──────────────── */
.handdrawn-1 {
  border-top-left-radius: 35px 25px;
  border-top-right-radius: 20px 30px;
  border-bottom-right-radius: 40px 20px;
  border-bottom-left-radius: 25px 35px;
}
.handdrawn-2 {
  border-top-left-radius: 30px 20px;
  border-top-right-radius: 25px 35px;
  border-bottom-right-radius: 35px 25px;
  border-bottom-left-radius: 40px 30px;
}
.handdrawn-3 {
  border-top-left-radius: 40px 30px;
  border-top-right-radius: 20px 25px;
  border-bottom-right-radius: 30px 35px;
  border-bottom-left-radius: 25px 20px;
}
.handdrawn-4 {
  border-top-left-radius: 25px 30px;
  border-top-right-radius: 35px 20px;
  border-bottom-right-radius: 20px 40px;
  border-bottom-left-radius: 30px 25px;
}
.handdrawn-5 {
  border-top-left-radius: 40px 20px;
  border-top-right-radius: 30px 25px;
  border-bottom-right-radius: 25px 40px;
  border-bottom-left-radius: 35px 30px;
}

/* ──────────────── LAYOUT ──────────────── */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* ──────────────── HERO ──────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 2.5rem 0 1.5rem;
}

.hero-copy {
  flex: 1 1 540px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 1.1rem;
}

.hero-copy h1 {
  margin: 0;
  font-size: 2.65rem;
  font-weight: 800;
  line-height: 1.1;
}

.wink {
  font-size: 0.85em;
  filter: grayscale(1);
}

.lede {
  margin: 0;
  font-size: 1.05rem;
  color: var(--foreground-soft);
}

.lede em {
  font-style: italic;
}

.cta-row {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.fine {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.hero-art {
  flex: 0 0 240px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--foreground);
}

.phone-sketch {
  width: 220px;
  height: auto;
  transform: rotate(-2deg);
}

@media (max-width: 820px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .hero-art {
    order: -1;
    flex-basis: auto;
    align-self: center;
  }
  .phone-sketch {
    width: 170px;
  }
}

/* ──────────────── BUTTONS ──────────────── */
/* Button is a stack: face (top, interactive) + shadow (offset behind). */
.btn {
  position: relative;
  display: inline-block;
  min-width: 168px;
  height: 48px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.btn-face,
.btn-shadow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--foreground);
}

.btn-face {
  z-index: 2;
  transition: transform 220ms ease-in-out;
}

.btn-shadow {
  z-index: 1;
  transform: translate(var(--shadow-offset), var(--shadow-offset));
}

.btn-filled .btn-face {
  background: var(--foreground);
  color: var(--background);
}

.btn-filled .btn-shadow {
  background: var(--background);
}

.btn-outline .btn-face {
  background: var(--background);
  color: var(--foreground);
}

.btn-outline .btn-shadow {
  background: var(--foreground);
}

.btn:hover .btn-face {
  transform: translate(2px, 2px);
}

/* ──────────────── SECTIONS ──────────────── */
.section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.section-head-right {
  align-items: flex-end;
}

.section-head h2 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 800;
}

.rule {
  height: 4px;
  border-radius: 4px;
  background: var(--foreground);
  margin-top: 0.25rem;
}

.rule-md { width: 96px; }
.rule-lg { width: 140px; }

.section-blurb {
  font-size: 1.05rem;
  max-width: 720px;
}

.section-blurb-right {
  text-align: right;
  margin-left: auto;
}

/* ──────────────── ROW CARDS (features + how-it-works) ──────────────── */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

/* Each card sits on the cream background with a 2px dark border and a hard
 * offset shadow behind it — same pattern the reference site uses for blog
 * cards. box-shadow respects border-radius so the asymmetric handdrawn-N
 * corners are mirrored by the shadow automatically. */
.row-card {
  position: relative;
  background: var(--background);
  color: var(--foreground);
  border: 2px solid var(--foreground);
  padding: 1.1rem 1.4rem 1.2rem;
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 0 var(--foreground);
  transition: transform 180ms ease-in-out, box-shadow 180ms ease-in-out;
}

.row-card:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 var(--foreground);
}

.row-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

.row-card p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
}

.row-card strong {
  font-weight: 700;
  /* a touch of underline so emphasis reads at a glance even on Excalifont,
   * which doesn't have a dedicated bold weight */
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* ──────────────── TIMELINE (How It Works) ──────────────── */
:root {
  --badge-size: 56px;
}

.timeline {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

/* Dashed vertical connector running through the centre of every badge.
 * Stops at the top of the first badge and the bottom of the last so it
 * looks like a single drawn-through line rather than capped by edges. */
.timeline::before {
  content: "";
  position: absolute;
  left: calc(var(--badge-size) / 2 - 1px);
  top: calc(var(--badge-size) / 2);
  bottom: calc(var(--badge-size) / 2);
  border-left: 2.5px dashed var(--foreground);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: var(--badge-size) 1fr;
  column-gap: 1.5rem;
  align-items: start;
  z-index: 1;
}

.step-badge {
  width: var(--badge-size);
  height: var(--badge-size);
  background: var(--background);
  border: 2px solid var(--foreground);
  box-shadow: 3px 3px 0 0 var(--foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.step-badge span {
  /* Excalifont rides slightly low — nudge the digit so it sits centred
   * inside the badge. */
  transform: translateY(2px);
}

/* Cards inside the timeline take the rest of the row; pin their margin to
 * line up the title with the badge centre. */
.step .row-card {
  margin: 0;
}

@media (max-width: 560px) {
  :root {
    --badge-size: 44px;
  }
  .step {
    column-gap: 0.9rem;
  }
  .step-badge {
    font-size: 1.25rem;
    box-shadow: 2px 2px 0 0 var(--foreground);
  }
}

/* ──────────────── COMPARISON TABLE ──────────────── */
.table-wrap {
  position: relative;
  margin-top: 0.5rem;
}

.compare-table-shadow {
  position: absolute;
  inset: 0;
  background: var(--foreground);
  border: 2px solid var(--foreground);
  transform: translate(var(--shadow-offset), var(--shadow-offset));
  z-index: 1;
}

/* `border-collapse: separate` is what lets `overflow: hidden` actually clip
 * cell content to the rounded handdrawn-2 corners. With `collapse` the cells
 * extend past the radius and the bottom corner looks broken. */
.compare-table {
  position: relative;
  z-index: 2;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--background);
  border: 2px solid var(--foreground);
  font-size: 1rem;
  overflow: hidden;
}

.compare-table th,
.compare-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  vertical-align: top;
}

/* Each body row except the first paints its own top divider so we can drop
 * the bottom-of-last-row line cleanly (and avoid doubling up against the
 * solid header underline). */
.compare-table tbody tr:not(:first-child) td,
.compare-table tbody tr:not(:first-child) th[scope="row"] {
  border-top: 1.5px dashed var(--foreground);
}

.compare-table thead th {
  border-bottom: 2px solid var(--foreground);
  font-size: 1.05rem;
  font-weight: 800;
}

.compare-table th[scope="row"] {
  width: 25%;
  font-weight: 700;
  color: var(--foreground);
  border-right: 1.5px dashed var(--foreground);
}

/* Pad the bottom row a touch extra so its text doesn't crowd the curve. */
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  padding-bottom: 1.1rem;
}

.th-pill {
  display: inline-block;
  padding: 4px 10px;
  border: 2px solid var(--foreground);
  border-radius: 999px;
}

.th-pill.bacchat {
  background: var(--foreground);
  color: var(--background);
}

@media (max-width: 720px) {
  .compare-table,
  .compare-table thead,
  .compare-table tbody,
  .compare-table th,
  .compare-table td,
  .compare-table tr {
    display: block;
  }
  .compare-table thead {
    display: none;
  }
  .compare-table tr {
    border-bottom: 2px dashed var(--foreground);
    padding: 0.5rem 0;
  }
  .compare-table th[scope="row"] {
    width: 100%;
    border-right: none;
    border-bottom: 1px dashed var(--foreground);
    background: transparent;
  }
  .compare-table td {
    border-bottom: none;
    padding-left: 1.5rem;
  }
  .compare-table td::before {
    content: attr(data-col) ": ";
    font-weight: 700;
  }
}

/* ──────────────── GET IT ──────────────── */
.get-row {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.get-copy {
  flex: 1 1 380px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 1.05rem;
}

.get-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

/* ──────────────── FOOTER ──────────────── */
.footer {
  border-top: 2px solid var(--foreground);
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  font-size: 0.95rem;
  color: var(--foreground-soft);
}

.footer p {
  margin: 0.2rem 0;
}

.footer strong a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
