/* ─── Fonts ─── */
@font-face {
  font-family: 'Epilogue';
  src: url('assets/fonts/Epilogue-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('assets/fonts/DMSans-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('assets/fonts/DMMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

/* ─── Tokens ─── */
:root {
  --color-accent: #5B2E91;
  --color-accent-rgb: 91, 46, 145;
  --color-bg: #FFFFFF;
  --color-bg-secondary: #F5F5F5;
  --color-label: #1A1A2E;
  --color-label-secondary: #3D3D5C;
  --color-label-tertiary: #7A7A9A;
  --color-separator: #E4DCD0;
  --color-accent-fill: #F0EBF8;

  --color-task-recurring: #0F6E56;
  --color-task-goal: #181051;
  --color-task-oneshot: #5B2E91;

  --radius-card: 14px;
  --radius-sheet: 34px;
  --radius-button: 10px;
  --radius-pill: 999px;

  --phone-gradient-start: #6C3FA0;
  --phone-gradient-end: #4A2D7A;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-accent: #9D6DE0;
    --color-accent-rgb: 157, 109, 224;
    --color-bg: #1A1710;
    --color-bg-secondary: #242318;
    --color-label: #EDDFE0;
    --color-label-secondary: #C5B8E8;
    --color-label-tertiary: #886DB6;
    --color-separator: #2E2D45;
    --color-accent-fill: #2A1E42;

    --color-task-recurring: #1D9E75;
    --color-task-goal: #376DE0;
    --color-task-oneshot: #9D6DE0;

    --phone-gradient-start: #9D6DE0;
    --phone-gradient-end: #5B2E91;
  }
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-label);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: 'Epilogue', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.75;
}

img {
  display: block;
  max-width: 100%;
}

/* ─── Geometric background texture ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(
      circle at 15% 25%,
      rgba(var(--color-accent-rgb), 0.04) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 85% 75%,
      rgba(var(--color-accent-rgb), 0.03) 0%,
      transparent 50%
    );
}

/* ─── HOMEPAGE ─── */

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 3rem;
  width: 100%;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.logo {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow:
    0 4px 16px rgba(var(--color-accent-rgb), 0.15),
    0 1px 3px rgba(0, 0, 0, 0.08);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-label);
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--color-label-secondary);
  line-height: 1.7;
  max-width: 380px;
}

.app-store-link {
  display: inline-block;
  margin-top: 0.5rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-link:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.app-store-link img {
  height: 48px;
  width: auto;
}

@media (prefers-color-scheme: dark) {
  .app-store-link img {
    filter: invert(1);
  }
}

/* ─── Phone Mockup ─── */

.hero-phone {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-screenshot {
  width: 300px;
  height: auto;
}

.phone-screenshot--dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .phone-screenshot--light {
    display: none;
  }
  .phone-screenshot--dark {
    display: block;
  }
}

/* ─── Footer ─── */

footer {
  padding: 2rem 2rem;
  text-align: center;
  border-top: 1px solid var(--color-separator);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--color-label-tertiary);
}

.footer-links a:hover {
  color: var(--color-accent);
  opacity: 1;
}

.footer-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-separator);
}

/* ─── CONTENT PAGES (Terms, Privacy) ─── */

.page-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--color-separator);
}

.page-header a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-label);
  font-family: 'Epilogue', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}

.logo-small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.content {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  width: 100%;
}

.content h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.content .last-updated {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: var(--color-label-tertiary);
  margin-bottom: 2.5rem;
}

.content h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-label);
}

.content p {
  color: var(--color-label-secondary);
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 1.5rem;
    text-align: center;
  }

  .hero-text {
    align-items: center;
  }

  .hero-tagline {
    max-width: 100%;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .phone-screenshot {
    width: 240px;
  }

  .content {
    padding: 2rem 1.25rem 3rem;
  }

  .content h1 {
    font-size: 1.75rem;
  }

  .page-header {
    padding: 1.25rem 1.25rem;
  }
}
