/* dailio marketing site — dark theme aligned with the app */

:root {
  --bg: #0a0a0b;
  --bg-elevated: #121214;
  --card: #1c1c1e;
  --card-hover: #242426;
  --text: #f5f5f7;
  --text-muted: #8e8e93;
  --accent: #7b61ff;
  --accent-dim: rgba(123, 97, 255, 0.15);
  --accent-glow: rgba(123, 97, 255, 0.45);
  --success: #00d166;
  --shared: #ff4b6c;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1120px;
  /* Bar height inside the header (below safe-area); keep in sync with .site-header__inner min-height */
  --header-inner-min-h: 72px;
  --site-header-offset: calc(var(--header-inner-min-h) + env(safe-area-inset-top, 0px));
  --gutter-left: max(1.25rem, env(safe-area-inset-left, 0px));
  --gutter-right: max(1.25rem, env(safe-area-inset-right, 0px));
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* hidden avoids Safari compositing bugs with fixed header + backdrop-filter (clip could shear content below) */
  overflow-x: hidden;
  scroll-padding-top: var(--site-header-offset);
}

html.nav-open {
  overflow: hidden;
}

html.nav-open body {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main {
  padding-top: var(--site-header-offset);
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  color: var(--text-muted);
  padding-left: 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: env(safe-area-inset-top, 0px);
}

.site-header__inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header-inner-min-h);
  padding-left: var(--gutter-left);
  padding-right: var(--gutter-right);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 1;
}

.logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-desktop a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-desktop a:hover {
  color: var(--text);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 768px) {
  :root {
    --header-inner-min-h: 68px;
    --gutter-left: max(1rem, env(safe-area-inset-left, 0px));
    --gutter-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .site-header__inner {
    gap: 0.5rem;
  }

  .site-footer {
    /* iOS Safari toolbar often sits outside safe-area; extra scroll room so last lines stay readable */
    padding-bottom: max(4.5rem, calc(2.75rem + env(safe-area-inset-bottom, 0px)));
  }

  .nav-toggle {
    display: flex;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-tap-highlight-color: transparent;
  }

  .nav-desktop {
    display: none;
    position: absolute;
    z-index: 90;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding:
      0.75rem var(--gutter-right) max(1rem, env(safe-area-inset-bottom, 0px))
      var(--gutter-left);
    background: var(--bg-elevated);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    gap: 0;
    max-height: min(70vh, calc(100dvh - var(--site-header-offset)));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-desktop.is-open {
    display: flex;
  }

  .nav-desktop a {
    padding: 0.95rem 0.125rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    -webkit-tap-highlight-color: rgba(123, 97, 255, 0.15);
  }

  .nav-cta {
    flex-shrink: 0;
    gap: 0.5rem;
  }

  .nav-cta .btn {
    padding: 0.55rem 0.8rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .nav-cta .btn--ghost {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  min-height: 44px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: rgba(123, 97, 255, 0.2);
  touch-action: manipulation;
}

@media (hover: hover) {
  .btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
  }
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}

@media (hover: hover) {
  .btn--primary:hover {
    box-shadow: 0 8px 32px -8px var(--accent-glow);
    color: #fff;
  }
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (hover: hover) {
  .btn--ghost:hover {
    background: var(--card);
    color: var(--text);
  }
}

.btn--large {
  padding: 1rem 1.75rem;
  font-size: 1rem;
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter-left);
  padding-right: var(--gutter-right);
}

.section {
  padding: 5rem 0;
}

.section--tight {
  padding: 3rem 0;
}

.section__title {
  color: var(--text);
  margin: 0 0 0.75rem;
}

.section__lead {
  font-size: 1.125rem;
  max-width: 36rem;
  margin: 0 0 2.5rem;
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
  position: relative;
  /* Full-bleed ::before needs viewport width; clip vertically only so glow can span edge-to-edge */
  overflow-x: clip;
  overflow-y: visible;
}

@media (max-width: 640px) {
  :root {
    --gutter-left: max(0.95rem, env(safe-area-inset-left, 0px));
    --gutter-right: max(0.95rem, env(safe-area-inset-right, 0px));
  }

  .section {
    padding: 2.75rem 0;
  }

  .section--tight {
    padding: 1.8rem 0;
  }

  .hero {
    padding: 2.25rem 0 3rem;
  }

  .campaign-hero {
    padding: 2.15rem 0 1.85rem;
  }

  .section__lead {
    font-size: 1.05rem;
    margin-bottom: 1.75rem;
  }

  .hero .section__lead {
    font-size: 1.05rem;
  }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-group .btn,
  .btn-group .btn--large {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }

  .feature-card {
    padding: 1.35rem;
  }

  .stats {
    padding: 1.2rem;
    gap: 1.25rem;
  }

  .stat strong {
    font-size: 1.5rem;
  }

  .article h2 {
    font-size: 1.2rem;
  }
}

@media (max-width: 420px) {
  :root {
    --gutter-left: max(0.85rem, env(safe-area-inset-left, 0px));
    --gutter-right: max(0.85rem, env(safe-area-inset-right, 0px));
  }
}

.hero::before {
  content: "";
  position: absolute;
  /* Extend well past section so blur reads full-width on large screens */
  inset: -30% -50% -18% -50%;
  min-height: 120%;
  z-index: 0;
  pointer-events: none;
  /* Layer 1: light edge feather so purple can bloom across most of the viewport */
  /* Layer 2: large radial—center biased toward phone column on desktop */
  background:
    linear-gradient(
      100deg,
      var(--bg) 0%,
      rgba(10, 10, 11, 0.85) 8%,
      rgba(10, 10, 11, 0) 28%,
      rgba(10, 10, 11, 0) 62%,
      rgba(10, 10, 11, 0.35) 88%,
      var(--bg) 100%
    ),
    radial-gradient(
      ellipse min(120vw, 1600px) min(95%, 900px) at 58% 46%,
      rgba(123, 97, 255, 0.42) 0%,
      rgba(123, 97, 255, 0.22) 32%,
      rgba(123, 97, 255, 0.09) 52%,
      rgba(10, 10, 11, 0.55) 72%,
      var(--bg) 92%
    );
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .hero::before {
    inset: -35% -45% -12% -45%;
    background:
      linear-gradient(180deg, rgba(10, 10, 11, 0.15) 0%, rgba(10, 10, 11, 0) 22%, var(--bg) 100%),
      radial-gradient(
        ellipse 130% 70% at 50% 18%,
        rgba(123, 97, 255, 0.38) 0%,
        rgba(123, 97, 255, 0.16) 40%,
        rgba(10, 10, 11, 0.65) 70%,
        var(--bg) 90%
      );
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero__copy .btn-group {
    justify-content: center;
  }

  .hero__copy .section__lead {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 1rem;
  color: var(--text);
}

.hero .section__lead {
  margin-bottom: 2rem;
  font-size: 1.2rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.phone-frame {
  position: relative;
  width: 100%;
  max-width: min(280px, 100%);
  margin-left: auto;
  margin-right: auto;
  border-radius: 36px;
  padding: 10px;
  background: linear-gradient(145deg, #2a2a2e, #121214);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 80px -24px rgba(0, 0, 0, 0.8),
    0 0 60px -20px var(--accent-glow);
}

.phone-frame img {
  border-radius: 28px;
  width: 100%;
}

/* Cards & features */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
  .feature-card:hover {
    background: var(--card-hover);
    border-color: rgba(123, 97, 255, 0.2);
  }
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--accent-dim);
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
}

.feature-card p {
  font-size: 0.9375rem;
  margin: 0;
}

/* Personal / founder voice — distinct from feature cards */
.personal-note {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
  background: linear-gradient(145deg, rgba(123, 97, 255, 0.08) 0%, var(--card) 55%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(123, 97, 255, 0.18);
}

.personal-note__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.personal-note p {
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.personal-note p:last-child {
  margin-bottom: 0;
}

.personal-note .signature {
  margin-top: 1.25rem;
  margin-bottom: 0;
  font-size: 0.9375rem;
  color: var(--text);
  font-style: italic;
}

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stat span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stat--accent strong {
  color: var(--accent);
}

.stat--success strong {
  color: var(--success);
}

/* Social proof / pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.pill--shared {
  background: rgba(255, 75, 108, 0.15);
  color: var(--shared);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 720px;
}

details.faq-item {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

details.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  min-height: 52px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  -webkit-tap-highlight-color: rgba(123, 97, 255, 0.12);
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 400;
}

details.faq-item[open] summary::after {
  content: "−";
}

details.faq-item .faq-body {
  padding: 0 1.25rem 1.15rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

@media (min-width: 480px) {
  details.faq-item summary {
    padding: 1.25rem 1.5rem;
  }

  details.faq-item .faq-body {
    padding: 0 1.5rem 1.25rem;
  }
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 960px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
  min-width: 0;
}

@media (hover: hover) {
  .blog-card:hover {
    border-color: rgba(123, 97, 255, 0.25);
    transform: translateY(-2px);
  }
}

.blog-card a {
  color: inherit;
  text-decoration: none;
}

.blog-card a:hover {
  text-decoration: none;
}

.blog-card__thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--accent-dim), rgba(0, 209, 102, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.blog-card__body {
  padding: 1.5rem;
}

.blog-card__meta {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 1.125rem;
}

.blog-card p {
  font-size: 0.9375rem;
  margin: 0;
}

/* Article */
.article {
  max-width: 680px;
  margin: 0 auto;
}

.article__meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.article h1 {
  margin: 0 0 1.5rem;
}

.article h2 {
  margin: 2.5rem 0 1rem;
  color: var(--text);
  font-size: 1.35rem;
}

.article p {
  margin-bottom: 1.25rem;
}

.article .back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-weight: 500;
}

/* Ad / campaign hero */
.campaign-hero {
  text-align: center;
  padding: 5rem 0 4rem;
  position: relative;
}

.campaign-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-dim), transparent);
  pointer-events: none;
}

.campaign-hero .wrap {
  position: relative;
}

.campaign-hero h1 {
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}

.campaign-hero .section__lead {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.trust-badges span {
  padding: 0.5rem 1rem;
  background: var(--card);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Footer */
.site-footer {
  padding: 3rem 0 max(3rem, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 700px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .site-footer__tagline {
    max-width: none;
  }

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

  .site-footer a {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
  }
}

.site-footer .logo {
  margin-bottom: 0.75rem;
  display: inline-block;
}

.site-footer__tagline {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 280px;
}

.site-footer h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-weight: 600;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.5rem;
}

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

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

.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.mb-lg {
  margin-bottom: 3rem;
}
