:root {
  --white: #ffffff;
  --pale-blue: #dee5f2;
  --light-grey: #cacbd5;
  --blue-grey: #666f89;
  --dark-slate: #3d4252;
  --red: #a32714;
  --red-dark: #7f1f10;
  --green: #1f7a4d;

  --text: var(--dark-slate);
  --muted: var(--blue-grey);
  --border: rgba(61, 66, 82, 0.14);
  --shadow: 0 24px 70px rgba(61, 66, 82, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--pale-blue);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(222, 229, 242, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px clamp(20px, 4vw, 40px);
}

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

.brand img {
  width: 108px;
  height: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--dark-slate);
}

.nav a {
  text-decoration: none;
  opacity: 0.82;
}

.nav a:hover,
.nav a.active {
  opacity: 1;
  color: var(--red);
}

.hero {
  min-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
  padding: 72px clamp(20px, 5vw, 72px);
  background:
    radial-gradient(circle at 84% 16%, rgba(163, 39, 20, 0.13), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #dee5f2 58%, #cacbd5 100%);
}

.hero.compact {
  min-height: auto;
  padding-top: 88px;
  padding-bottom: 88px;
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
  color: var(--dark-slate);
}

h1.smaller {
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
}

.intro {
  max-width: 650px;
  margin-bottom: 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 16px 36px rgba(163, 39, 20, 0.24);
}

.primary:hover {
  background: var(--red-dark);
}

.secondary {
  background: rgba(255, 255, 255, 0.74);
  color: var(--dark-slate);
  border: 1px solid var(--border);
}

.secondary:hover {
  background: var(--white);
}

.light {
  background: var(--white);
  color: var(--dark-slate);
}

.light:hover {
  background: var(--pale-blue);
}

.hero-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  padding: 48px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 44px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(222, 229, 242, 0.42));
  box-shadow: var(--shadow);
}

.hero-logo-card img {
  width: min(100%, 420px);
  height: auto;
  display: block;
}

.hero-logo-card.app-icon img {
  width: min(70%, 260px);
  border-radius: 22.37%;
  box-shadow: 0 20px 46px rgba(61, 66, 82, 0.22);
}

.section {
  padding: 96px clamp(20px, 5vw, 72px);
  background: var(--white);
}

.section.alt {
  background: var(--pale-blue);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.section h2,
.feature-section h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.card {
  min-height: 270px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(61, 66, 82, 0.08);
}

.card-number {
  display: inline-flex;
  margin-bottom: 34px;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  color: var(--red);
}

.card h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

.feature-section {
  padding: 96px clamp(20px, 5vw, 72px);
  background:
    linear-gradient(135deg, rgba(61, 66, 82, 0.94), rgba(61, 66, 82, 0.82)),
    radial-gradient(circle at top right, rgba(163, 39, 20, 0.55), transparent 28%);
  color: var(--white);
}

.feature-content {
  max-width: 840px;
}

.feature-section .eyebrow {
  color: var(--light-grey);
}

.feature-section p {
  max-width: 720px;
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.78);
}

.feature-section .actions {
  margin-top: 32px;
}

/* App store / play store badges */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 22px;
  border-radius: 16px;
  background: var(--dark-slate);
  color: var(--white);
  text-decoration: none;
  font-weight: 650;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge .store-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-badge .store-badge-eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.78;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.store-badge .store-badge-name {
  font-size: 1.05rem;
  font-weight: 750;
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.store-badge.disabled {
  background: rgba(61, 66, 82, 0.5);
  cursor: default;
  pointer-events: none;
}

.store-badge.disabled:hover {
  transform: none;
}

/* Contact page */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
}

.contact-card {
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(61, 66, 82, 0.08);
}

.contact-card h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.contact-card p {
  color: var(--muted);
  margin-bottom: 18px;
}

.contact-card a.email {
  display: inline-flex;
  font-weight: 750;
  color: var(--red);
  text-decoration: none;
  font-size: 1.1rem;
}

.contact-card a.email:hover {
  text-decoration: underline;
}

/* Privacy / policy article */

.policy-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 0 48px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--pale-blue);
  list-style: none;
}

.policy-toc a {
  font-weight: 650;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--dark-slate);
  opacity: 0.82;
}

.policy-toc a:hover {
  opacity: 1;
  color: var(--red);
}

.policy-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.policy-article {
  max-width: 820px;
}

.policy-article h2 {
  margin-top: 56px;
  margin-bottom: 18px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  padding-top: 8px;
}

.policy-article h2:first-of-type {
  margin-top: 0;
}

.policy-article h3 {
  margin-top: 30px;
  margin-bottom: 12px;
  font-size: 1.15rem;
  color: var(--red);
  letter-spacing: -0.01em;
}

.policy-article p,
.policy-article li {
  color: var(--muted);
  font-size: 1.02rem;
}

.policy-article ul {
  padding-left: 22px;
  margin-bottom: 20px;
}

.policy-article li {
  margin-bottom: 8px;
}

.policy-article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

.policy-article strong {
  color: var(--dark-slate);
}

.site-footer {
  padding: 30px clamp(20px, 5vw, 72px);
  background: var(--dark-slate);
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-footer p {
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 22px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-nav a:hover {
  color: var(--white);
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-logo-card {
    min-height: 320px;
  }

  .cards,
  .cards.cards-2 {
    grid-template-columns: 1fr;
  }

  .contact-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
  }

  .site-header-inner {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .brand img {
    width: 96px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.88rem;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .hero-logo-card {
    padding: 32px;
    border-radius: 32px;
  }

  .section,
  .feature-section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .policy-toc {
    flex-direction: column;
    gap: 8px;
  }
}

/* ============================================================
   App page brand theme — "This is My Life" own colors, taken
   from the app's Xcode asset catalog (AccentColor, SelectionAccent,
   AppBackground), distinct from the TidyByte red/slate parent brand.
   ============================================================ */

body.app-theme {
  --app-bg: #f4f1f9;
  --app-accent: #4d3b73;
  --app-accent-dark: #3a2c58;
  --app-muted: #797187;
  --app-mint: #cfead9;
  --app-sky: #cddef0;
  --app-peach: #f6e3c5;
  --app-lavender: #ddd3f0;
  background: var(--app-bg);
}

body.app-theme .nav a:hover,
body.app-theme .nav a.active {
  color: var(--app-accent);
}

body.app-theme .eyebrow {
  color: var(--app-accent);
}

body.app-theme .app-banner {
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 28px;
  padding: 96px clamp(20px, 5vw, 72px);
  position: relative;
  overflow: hidden;
  background: var(--app-bg);
}

body.app-theme .app-banner::before,
body.app-theme .app-banner::after {
  content: "";
  position: absolute;
  width: 46vw;
  max-width: 620px;
  aspect-ratio: 1;
  border-radius: 40%;
  filter: blur(60px);
  opacity: 0.65;
  z-index: 0;
}

body.app-theme .app-banner::before {
  top: -14%;
  right: -10%;
  background:
    conic-gradient(from 200deg, var(--app-mint), var(--app-sky) 35%, var(--app-peach) 65%, var(--app-lavender));
}

body.app-theme .app-banner::after {
  bottom: -18%;
  left: -12%;
  background:
    conic-gradient(from 20deg, var(--app-lavender), var(--app-peach) 35%, var(--app-mint) 65%, var(--app-sky));
}

body.app-theme .app-banner-icon {
  width: min(34vw, 180px);
  height: min(34vw, 180px);
  border-radius: 22.37%;
  box-shadow: 0 24px 60px rgba(77, 59, 115, 0.28);
  position: relative;
  z-index: 1;
}

body.app-theme .app-banner h1 {
  position: relative;
  z-index: 1;
  max-width: 900px;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: -0.04em;
  color: var(--app-accent-dark);
}

body.app-theme .app-banner .tagline {
  position: relative;
  z-index: 1;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--app-muted);
}

body.app-theme .app-banner .intro {
  position: relative;
  z-index: 1;
  color: var(--app-muted);
}

body.app-theme .store-badges {
  position: relative;
  z-index: 1;
  justify-content: center;
}

body.app-theme .store-badge {
  background: var(--app-accent);
}

body.app-theme .store-badge.disabled {
  background: rgba(77, 59, 115, 0.4);
}

body.app-theme .section-heading .eyebrow {
  color: var(--app-accent);
}

body.app-theme .card-number {
  color: var(--app-accent);
}

body.app-theme .feature-section {
  background:
    linear-gradient(135deg, rgba(61, 51, 74, 0.94), rgba(45, 38, 66, 0.9)),
    radial-gradient(circle at top right, rgba(77, 59, 115, 0.6), transparent 30%);
}

body.app-theme .feature-section .button.light {
  color: var(--app-accent-dark);
}

body.app-theme .video-frame {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}

body.app-theme .video-frame video {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 680px) {
  body.app-theme .app-banner {
    padding-top: 64px;
    padding-bottom: 64px;
    gap: 20px;
  }
}
