:root {
  --brand: #EE7943;
  --brand-muted: #F7C6AD;
  --brand-strong: #9A3714;
  --accent: #8DA249;
  --accent-muted: #DCE6B4;
  --accent-strong: #82983F;
  --brand-variant: #EBAF47;
  --accent-variant: #759DA9;
  --surface-base: #F2EFE2;
  --surface-raised: #FAF8F0;
  --surface-elevated: #FFFFFF;
  --surface-tint: #EEEBDC;
  --text-primary: #25291C;
  --text-secondary: #4A4F3D;
  --text-tertiary: #6E7361;
  --text-inverse: #FFFFFF;
  --border: #D8D5C2;
  --border-strong: #9EA28D;
  --fill-muted: #E3DFCC;
  --error: #B13F32;
  --shadow: 0 18px 48px rgba(37, 41, 28, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--surface-base);
  color: var(--text-primary);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url('/assets/grain-256.png');
  background-size: 160px 160px;
  opacity: 0.14;
  mix-blend-mode: multiply;
  z-index: 0;
}

img {
  max-width: 100%;
}

a {
  color: var(--brand-strong);
}

a:hover {
  color: var(--brand);
}

h1,
h2 {
  font-family: 'Caprasimo', Georgia, serif;
  font-weight: 400;
  line-height: 1.12;
  margin: 0;
}

h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

p {
  margin: 0;
}

.site-shell,
.center-shell,
.document-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.site-nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px;
}

.site-nav.on-photo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-inverse);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(37, 41, 28, 0.18);
}

.wordmark {
  width: 142px;
  height: auto;
  display: block;
}

.site-nav.on-photo .wordmark {
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.32));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
}

.nav-links a {
  color: inherit;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--brand-muted);
}

.hero {
  position: relative;
  min-height: 86svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(37, 41, 28, 0.78) 0%, rgba(37, 41, 28, 0.52) 45%, rgba(37, 41, 28, 0.14) 100%),
    url('/assets/hang-photo.png') center / cover no-repeat;
}

.hero-content {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 128px 24px 72px;
  color: var(--text-inverse);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--brand-strong);
}

.hero-kicker::before,
.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand-variant);
}

.hero h1 {
  max-width: 720px;
  font-size: 64px;
}

.hero-copy {
  max-width: 640px;
  margin-top: 16px;
  color: #F7F2E9;
  font-size: 20px;
  line-height: 1.45;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.download-cta {
  margin-top: 28px;
}

.mobile-download {
  width: 100%;
}

.desktop-store-options {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.platform-button {
  min-height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text-primary);
  text-decoration: none;
  background: rgba(250, 248, 240, 0.94);
  border: 2px solid rgba(250, 248, 240, 0.46);
  box-shadow: 0 10px 22px rgba(37, 41, 28, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.platform-button:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(37, 41, 28, 0.18);
}

.platform-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--text-inverse);
  font-weight: 800;
  line-height: 1;
}

.platform-icon.apple {
  background: var(--text-primary);
}

.platform-icon.play {
  background: var(--brand);
}

.platform-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.platform-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.platform-copy small {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.platform-copy strong {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.2;
}

.app-button,
.text-link-button {
  min-height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.app-button:hover,
.text-link-button:hover {
  transform: translateY(-1px);
}

.app-button.primary {
  background: var(--brand);
  color: var(--text-inverse);
  box-shadow: 0 10px 22px rgba(154, 55, 20, 0.22);
}

.app-button.dark {
  background: var(--text-primary);
  color: var(--surface-base);
  box-shadow: 0 10px 22px rgba(37, 41, 28, 0.22);
}

.app-button.secondary,
.text-link-button {
  background: rgba(250, 248, 240, 0.92);
  color: var(--text-primary);
  border: 2px solid rgba(250, 248, 240, 0.42);
}

.app-button[data-smart-download] {
  cursor: pointer;
}

.section {
  padding: 56px 24px;
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section h2 {
  font-size: 32px;
}

.section-copy {
  max-width: 720px;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 17px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.feature-tile,
.faq-item,
.link-panel,
.code-box,
.not-found-panel {
  background: var(--surface-raised);
  border: 2px solid var(--border);
  border-radius: 20px;
}

.feature-tile {
  padding: 18px;
}

.feature-tile strong,
.stat-value {
  display: block;
  font-family: 'Caprasimo', Georgia, serif;
  font-weight: 400;
  color: var(--text-primary);
}

.feature-tile strong {
  font-size: 22px;
}

.feature-tile span {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.brand-band {
  background: var(--text-primary);
  color: var(--surface-base);
}

.brand-band .section-copy {
  color: #D4D1C1;
}

.brand-band .feature-tile {
  background: #2F3325;
  border-color: #4A4F3D;
}

.brand-band .feature-tile strong {
  color: var(--brand-variant);
}

.brand-band .feature-tile span {
  color: #D4D1C1;
}

.center-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  background:
    linear-gradient(180deg, rgba(242, 239, 226, 0.82), rgba(242, 239, 226, 0.98)),
    url('/assets/brand-og.png') center / cover no-repeat;
}

.invite-panel {
  width: min(100%, 440px);
  background: rgba(250, 248, 240, 0.95);
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow);
  text-align: center;
}

.panel-logo {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  display: block;
  margin: 0 auto 20px;
  box-shadow: 0 12px 26px rgba(37, 41, 28, 0.16);
}

.invite-panel h1,
.not-found-panel h1 {
  font-size: 30px;
}

.subtitle {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.55;
}

.code-box {
  max-width: 248px;
  margin: 24px auto 0;
  padding: 14px 18px;
  display: none;
  background: var(--surface-elevated);
  border-style: dashed;
  border-color: var(--brand);
}

.code-box.visible {
  display: block;
}

.code-label {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.code-value {
  margin-top: 2px;
  color: var(--text-primary);
  font-family: 'Caprasimo', Georgia, serif;
  font-size: 28px;
}

.panel-footer,
.footer {
  margin-top: 24px;
  color: var(--text-tertiary);
  font-size: 13px;
  text-align: center;
}

.panel-footer a,
.footer a {
  color: var(--text-tertiary);
  text-decoration: none;
}

.panel-footer a:hover,
.footer a:hover {
  color: var(--brand);
}

.document-shell {
  padding-bottom: 56px;
}

.document-hero {
  padding: 42px 24px 26px;
  background: var(--surface-tint);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.document-hero-inner,
.document {
  max-width: 820px;
  margin: 0 auto;
}

.document-hero h1 {
  font-size: 38px;
}

.updated {
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.document {
  padding: 34px 24px 0;
}

.document h2 {
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: 24px;
}

.document h3 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-weight: 700;
}

.document p,
.document li {
  color: var(--text-primary);
  font-size: 15px;
}

.document p {
  margin-bottom: 13px;
}

.document ul,
.document ol {
  padding-left: 22px;
  margin: 0 0 14px;
}

.document li {
  margin-bottom: 7px;
}

.summary,
.toc,
.faq-item {
  background: var(--surface-raised);
  border: 2px solid var(--border);
  border-radius: 18px;
}

.summary {
  padding: 16px 18px;
  margin: 16px 0 18px;
  color: var(--text-secondary);
}

.summary strong {
  color: var(--text-primary);
}

.toc {
  padding: 18px 20px;
  margin: 22px 0 24px;
}

.toc h3 {
  margin-top: 0;
}

.toc a {
  text-decoration: none;
}

.document table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 18px;
  background: var(--surface-raised);
  border: 2px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  font-size: 14px;
}

.document th,
.document td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.document th {
  background: var(--fill-muted);
  font-weight: 700;
}

.document tr:last-child td {
  border-bottom: 0;
}

.document code {
  background: var(--fill-muted);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--text-secondary);
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
}

.support-header {
  text-align: center;
}

.support-header .wordmark {
  margin: 0 auto 18px;
}

.email-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 24px 0 10px;
}

.email-address {
  color: var(--text-tertiary);
  font-size: 14px;
}

.faq {
  margin-top: 34px;
}

.faq h2 {
  text-align: center;
}

.faq-item {
  padding: 16px 18px;
  margin-top: 12px;
}

.faq-item p {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.link-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 28px;
  font-size: 14px;
}

.link-row a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-weight: 700;
}

.link-row a:hover {
  color: var(--brand);
}

.not-found-panel {
  width: min(100%, 440px);
  padding: 30px;
  box-shadow: var(--shadow);
  text-align: center;
}

.not-found-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  min-height: 34px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--brand-muted);
  color: var(--brand-strong);
  font-weight: 800;
}

@media (max-width: 720px) {
  .site-nav {
    padding: 18px;
  }

  .wordmark {
    width: 124px;
  }

  .nav-links {
    gap: 12px;
    font-size: 13px;
  }

  .hero {
    min-height: 86svh;
    background:
      linear-gradient(180deg, rgba(37, 41, 28, 0.58) 0%, rgba(37, 41, 28, 0.72) 62%, rgba(37, 41, 28, 0.82) 100%),
      url('/assets/hang-photo.png') center / cover no-repeat;
  }

  .hero-content {
    padding: 108px 18px 54px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-copy {
    font-size: 17px;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

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

  .section {
    padding: 44px 18px;
  }

  .section h2 {
    font-size: 28px;
  }

  .invite-panel {
    padding: 24px 20px;
  }

  .document-hero {
    padding: 30px 18px 22px;
  }

  .document-hero h1 {
    font-size: 32px;
  }

  .document {
    padding: 26px 18px 0;
  }

  .document table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (min-width: 721px) {
  .mobile-download {
    display: none;
  }

  .desktop-store-options {
    display: grid;
  }
}

@media (max-width: 460px) {
  .nav-links {
    display: none;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .hero h1 {
    font-size: 38px;
  }
}
