/* Mirrors src/theme/tokens.ts and src/theme/fonts.ts */
@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap");

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

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #16181d;
  --muted: #8a9099;
  --dim: #aeb3bb;
  --line: #eef0f3;
  --line-inner: #d7dbe2;
  --field: #f1f2f5;
  --field-border: #d7dbe2;
  --accent: #60a5fa;
  --accent-ink: #ffffff;
  --accent-subtle: #f5f8ff;
  --pos: #2bb98a;
  --neg: #f0726e;
  --shadow: rgba(20, 24, 29, 0.08);
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
}

.home-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 16px clamp(20px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-brand,
.nav-links {
  display: flex;
  align-items: center;
}

.nav-brand {
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.nav-brand img,
.brand-icon,
.legal-header img {
  border-radius: var(--radius-xs);
}

.nav-links {
  gap: 18px;
}

.nav-links a,
.text-link,
.web-link a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover,
.text-link:hover,
.web-link a:hover {
  color: var(--ink);
}

/* Home */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  align-items: center;
  gap: clamp(32px, 8vw, 96px);
  width: 100%;
  max-width: 1120px;
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 72px clamp(20px, 5vw, 64px) 48px;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(54px, 9vw, 104px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
}

.home-tagline {
  max-width: 540px;
  margin: 24px 0 32px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.cta-row {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 430px;
  margin-bottom: 18px;
}

.cta-btn,
.btn-primary,
.btn-secondary,
.store-btn {
  min-height: 48px;
  border-radius: var(--radius-xs);
}

.cta-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    opacity 0.15s;
}

.cta-btn:hover,
.btn-primary:hover {
  opacity: 0.88;
}

.cta-btn--primary,
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.cta-btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-inner);
}

.cta-btn--secondary:hover,
.btn-secondary:hover,
.store-btn:hover {
  border-color: var(--field-border);
  background: var(--field);
}

.cta-btn svg,
.store-btn svg {
  flex-shrink: 0;
}

.phone-preview {
  display: flex;
  justify-content: center;
  padding: 22px;
  background:
    linear-gradient(135deg, var(--accent-subtle), transparent 48%),
    linear-gradient(315deg, rgba(43, 185, 138, 0.11), transparent 42%),
    var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.phone-shell {
  width: min(100%, 308px);
  min-height: 590px;
  padding: 22px 16px;
  background: var(--surface);
  border: 1px solid var(--line-inner);
  border-radius: 30px;
  box-shadow: 0 24px 60px var(--shadow);
}

.phone-status,
.expense-row,
.settle-strip {
  display: flex;
  align-items: center;
}

.phone-status {
  justify-content: space-between;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.group-card {
  padding: 18px;
  margin-bottom: 12px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: var(--radius-md);
}

.group-card p {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
}

.group-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
}

.group-card span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.86;
}

.expense-row {
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.expense-row div {
  flex: 1;
  min-width: 0;
}

.expense-row strong,
.expense-row span {
  display: block;
}

.expense-row strong {
  font-size: 15px;
}

.expense-row span,
.settle-strip span {
  color: var(--muted);
  font-size: 13px;
}

.expense-row b {
  font-family: var(--font-display);
  font-size: 16px;
}

.expense-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
}

.expense-dot--blue {
  background: var(--accent);
}

.expense-dot--green {
  background: var(--pos);
}

.settle-strip {
  justify-content: space-between;
  margin-top: 22px;
  padding: 16px;
  background: var(--accent-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.settle-strip strong {
  color: var(--pos);
  font-family: var(--font-display);
}

.feature-band {
  border-top: 1px solid var(--line);
  background: var(--accent-subtle);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px clamp(20px, 5vw, 64px);
}

.feature-item {
  min-height: 130px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.feature-item strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

/* Invite */

.invite-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background:
    linear-gradient(135deg, var(--accent-subtle), transparent 42%), var(--bg);
}

.invite-card {
  width: 100%;
  max-width: 400px;
  padding: 32px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 44px var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.invite-card .brand-icon {
  width: 48px;
  height: 48px;
}

.brand-name {
  margin-top: 12px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.invite-title {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  text-align: center;
}

.invite-subtitle {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 17px 16px;
  border: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-secondary {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line-inner);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.invite-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 24px 0 16px;
}

.invite-divider::before,
.invite-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.invite-divider span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.invite-install-label {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.store-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.store-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 10px;
  background: var(--surface);
  border: 1px solid var(--line-inner);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.invite-hint {
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* Legal */

.legal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}

.legal-header a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.legal-header img {
  width: 28px;
  height: 28px;
}

.legal-main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.legal-main h1 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
}

.legal-main .updated {
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 13px;
}

.legal-main h2 {
  margin-top: 36px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.legal-main p,
.legal-main li {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.legal-main ul {
  margin: 0 0 14px 20px;
}

.legal-main a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.legal-main a:hover {
  text-decoration: underline;
}

/* Footer */

.site-footer {
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

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

.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 820px) {
  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 52px;
  }

  .hero-copy {
    max-width: none;
  }

  .phone-preview {
    max-width: 420px;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .home-nav {
    gap: 16px;
  }

  .home-hero h1 {
    font-size: 56px;
  }

  .home-tagline {
    font-size: 17px;
  }

  .cta-row,
  .store-row {
    flex-direction: column;
  }

  .home-hero {
    padding-top: 36px;
    padding-bottom: 20px;
  }

  .phone-preview {
    padding: 12px;
    max-height: 250px;
    overflow: hidden;
  }

  .phone-shell {
    min-height: 520px;
  }

  .invite-card {
    padding: 28px 20px 24px;
  }
}
