:root {
  color-scheme: light;
  --bg: #e9ddd0;
  --paper: #f8f2ea;
  --ink: #1d1a18;
  --ink-soft: #5f5752;
  --line: rgba(56, 38, 24, 0.16);
  --line-strong: rgba(56, 38, 24, 0.28);
  --brand: #153046;
  --brand-2: #6d8a96;
  --accent: #c18b3f;
  --accent-2: #9c6230;
  --card: rgba(255, 250, 243, 0.86);
  --shadow: 0 18px 55px rgba(35, 26, 18, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: "Outfit", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 0% 6%, rgba(255, 224, 173, 0.56), transparent 36%),
    radial-gradient(circle at 95% 12%, rgba(21, 48, 70, 0.2), transparent 38%),
    linear-gradient(180deg, #ede2d5 0%, #e8dacb 45%, #e6d6c6 100%);
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(125deg, rgba(255, 255, 255, 0.42), transparent 44%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 100% 100%, 26px 26px;
  opacity: 0.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 242, 234, 0.92);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.07em;
  background: linear-gradient(140deg, var(--brand), #355d7a 64%, var(--accent));
  box-shadow: 0 10px 26px rgba(21, 48, 70, 0.26);
}

.brand-copy strong {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-copy small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  text-decoration: none;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #4f4640;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(21, 48, 70, 0.1);
  color: #1c374d;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  padding: 0.55rem 0.95rem;
  font-weight: 800;
  color: #443a32;
  cursor: pointer;
}

#appRoot {
  display: block;
  isolation: isolate;
}

.section {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.3rem, 5vw, 4.8rem) 0;
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(310px, 0.5fr);
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.4rem);
}

.hero-copy {
  padding: clamp(1.2rem, 3vw, 2.2rem);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: linear-gradient(135deg, rgba(255, 253, 250, 0.74), rgba(255, 255, 255, 0.24));
  box-shadow: var(--shadow);
  animation: rise 0.7s ease both;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: -0.03em;
  color: #211a14;
}

.hero-copy h1,
.page-hero h1,
.app-detail-hero h1 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: 0.9;
}

.eyebrow,
.app-category {
  margin: 0;
  color: #73522f;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.lead {
  max-width: 880px;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.72;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.primary-button,
.secondary-button,
.mini-button,
.filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  border: 0;
  padding: 0.73rem 1.08rem;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #1b425f, #2e6288 58%, #8a5f2a);
  box-shadow: 0 12px 30px rgba(27, 66, 95, 0.24);
}

.app-theme .primary-button {
  background: linear-gradient(135deg, var(--app-accent-a, #1b425f), var(--app-accent-b, #2e6288) 58%, var(--app-accent-c, #8a5f2a));
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 252, 248, 0.9);
  color: #2a241f;
}

.primary-button:hover,
.secondary-button:hover,
.mini-button:hover,
.filter:hover {
  transform: translateY(-1px);
}

.disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.hero-panel {
  border-radius: 28px;
  padding: 1rem;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(253, 250, 246, 0.9), rgba(238, 224, 208, 0.8));
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.8rem;
  animation: rise 0.9s ease both;
}

.hero-panel::before {
  content: "Built from lived experience";
  display: block;
  padding: 0.92rem 1rem;
  border-radius: 16px;
  color: #f7f0e7;
  font-weight: 800;
  background: linear-gradient(135deg, #153046, #355d7a 55%, #9f6b32);
}

.stat {
  border-radius: 20px;
  padding: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.stat strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.stat span {
  color: var(--ink-soft);
  font-weight: 700;
}

.surface,
.content-panel,
.app-card,
.price-box,
.step {
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.surface {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 2rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}

h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 0.98;
}

h3 {
  margin: 0 0 0.8rem;
  font-size: 1.36rem;
}

p {
  line-height: 1.75;
  color: var(--ink-soft);
}

.section-heading {
  margin-bottom: 1.1rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading a,
.text-link {
  color: #1f4665;
  font-weight: 800;
  text-decoration: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.app-card {
  padding: 1.14rem;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  transition: transform 0.17s ease, border-color 0.17s ease;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.app-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  margin: 0.2rem 0 0.95rem;
  background: linear-gradient(140deg, #153046, #3a657f 58%, #c08a3f);
  box-shadow: 0 10px 24px rgba(21, 48, 70, 0.24);
}

.app-card p:not(.app-category) {
  flex: 1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0;
}

.tag-row span {
  border-radius: 999px;
  border: 1px solid rgba(56, 38, 24, 0.12);
  background: rgba(255, 255, 255, 0.66);
  color: #51463f;
  padding: 0.33rem 0.58rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.small-tags {
  margin-top: auto;
}

.card-actions {
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.mini-button {
  min-height: 38px;
  background: #153046;
  color: #fff;
  font-size: 0.84rem;
}

.mini-button.muted {
  border: 1px solid rgba(56, 38, 24, 0.22);
  background: rgba(255, 255, 255, 0.8);
  color: #6c5d4f;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.54rem;
  margin-bottom: 1.1rem;
}

.filter {
  border: 1px solid var(--line);
  background: rgba(255, 254, 251, 0.84);
  color: #463c34;
}

.filter.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #1e4868, #3a657f);
}

.app-detail-hero {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.4rem;
  align-items: end;
}

.back-link {
  display: inline-block;
  margin-bottom: 0.9rem;
  text-decoration: none;
  color: #72695f;
  font-weight: 700;
}

.price-box {
  padding: 1.3rem;
  background: linear-gradient(160deg, rgba(255, 250, 244, 0.94), rgba(236, 219, 201, 0.84));
}

.app-theme.price-box,
.app-theme .price-box {
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--app-accent-a, #1b425f) 8%, #fff8ef),
    color-mix(in srgb, var(--app-accent-c, #8a5f2a) 14%, #efe1d2)
  );
}

.price-box span {
  color: #76685c;
  font-weight: 700;
}

.price-box strong {
  display: block;
  margin: 0.25rem 0;
  font-size: 2.2rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 1rem;
}

.content-panel {
  padding: clamp(1.1rem, 2.6vw, 1.9rem);
}

.content-panel h2 {
  font-size: clamp(1.9rem, 3.3vw, 2.6rem);
}

.content-panel h3 {
  margin-top: 1.2rem;
}

.download-steps {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.72;
}

.download-steps li {
  margin-bottom: 0.48rem;
}

.small-panel h3:first-child {
  margin-top: 0;
}

.wide-copy {
  max-width: 960px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.screenshot-card {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 251, 246, 0.88);
  box-shadow: var(--shadow);
}

.screenshot-frame {
  aspect-ratio: 16 / 10;
  min-height: 220px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fef8f0, #e7dfd8);
}

.screenshot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.screenshot-frame span {
  display: none;
  padding: 1rem;
  text-align: center;
  color: #6f645c;
  font-weight: 700;
}

.screenshot-frame.missing span {
  display: block;
}

.screenshot-card figcaption {
  padding: 0.72rem 0.92rem;
  font-weight: 700;
  color: #6b6158;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.step {
  padding: 1.2rem;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.8rem;
  align-items: start;
}

.step span {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(140deg, #1c4768, #466f87);
}

.step h3 {
  margin: 0 0 0.3rem;
}

.site-footer {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.site-footer h3 {
  margin-bottom: 0.65rem;
}

.site-footer p {
  max-width: 640px;
  margin: 0;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 0.5rem;
}

.footer-links a {
  text-decoration: none;
  color: #6a5f54;
  font-weight: 700;
}

.footer-links a:hover {
  color: #1f4665;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .surface,
  .app-detail-hero,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 1.4rem;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-button {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.5rem);
    padding: 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(248, 242, 234, 0.98);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    text-align: center;
  }
}

@media (max-width: 690px) {
  .brand-copy small {
    display: none;
  }

  .card-grid,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .page-hero h1,
  .app-detail-hero h1 {
    font-size: clamp(2.6rem, 13vw, 4.3rem);
  }

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

  .card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mini-button {
    width: 100%;
  }

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

  .site-footer {
    flex-direction: column;
  }
}
