/* ============================================================
   Quit Snus — Design System
   Dark editorial: Inter, burnt-orange accent, grain texture
   ============================================================ */

/* --- Google Fonts (loaded in HTML, declared here for reference) ---
   Inter 400, 600, 700, 800
   ---------------------------------------------------------------- */

/* --- Tokens ------------------------------------------------ */
:root {
  /* Palette */
  --bg:              #0a0a0a;
  --surface:         #111111;
  --surface-hover:   #1a1a1a;
  --text:            #f0f0f0;
  --text-secondary:  #888888;
  --text-dim:        #555555;
  --accent:          #34d399;
  --accent-hover:    #6ee7b7;
  --accent-dim:      rgba(52, 211, 153, 0.12);
  --border:          rgba(255, 255, 255, 0.08);
  --border-accent:   rgba(52, 211, 153, 0.25);

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  12px;
  --space-lg:  16px;
  --space-xl:  24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;
  --space-5xl: 96px;

  /* Radii */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 999px;

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Transitions */
  --ease-out:         cubic-bezier(0.16, 1, 0.3, 1);
  --duration-quick:   0.15s;
  --duration-normal:  0.25s;
  --duration-slow:    0.5s;

  /* Layout */
  --max-width:     1120px;
  --content-width: 720px;

  /* Section spacing */
  --space-section: 140px;
}


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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}


/* --- Grain Texture Overlay --------------------------------- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
}


/* --- Typography -------------------------------------------- */
.display-lg {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.display-md {
  font-size: clamp(1.75rem, 3.5vw + 0.5rem, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.headline {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}

.body-lg {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.body {
  font-size: 1rem;
  line-height: 1.7;
}

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.caption {
  font-size: 0.8125rem;
  line-height: 1.5;
}


/* --- Layout ------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: var(--content-width);
}

section {
  padding: var(--space-section) 0;
}

@media (max-width: 768px) {
  :root {
    --space-section: 80px;
  }

  section {
    padding: var(--space-section) 0;
  }
}


/* --- Nav --------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background var(--duration-normal) var(--ease-out),
              backdrop-filter var(--duration-normal) var(--ease-out);
}

.nav--scrolled {
  background: rgba(10, 10, 10, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__logo-icon {
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.nav__logo-icon img {
  height: 40px;
  width: auto;
}

.nav__logo-text {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.nav__link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--duration-quick) ease-out;
}

.nav__link:hover {
  color: var(--text);
}

.nav__cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  transition: background var(--duration-quick) ease-out;
}

.nav__cta:hover {
  background: var(--accent-hover);
}

/* No hamburger — links always visible */


/* --- Hero -------------------------------------------------- */
.hero {
  position: relative;
  background: var(--bg);
  color: var(--text);
  padding: calc(88px + var(--space-5xl)) 0 var(--space-5xl);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.hero__content {
  text-align: left;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
}

.hero__title {
  color: var(--text);
  max-width: 560px;
}

.hero__subtitle {
  color: var(--text-secondary);
  max-width: 480px;
  margin-top: var(--space-lg);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.hero__actions {
  margin-top: var(--space-2xl);
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.hero__phone {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

@media (max-width: 768px) {
  .hero {
    padding-top: calc(88px + var(--space-4xl));
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
  }

  .hero__content {
    text-align: left;
  }

  .hero__phone {
    order: -1;
  }
}


/* --- Phone Frame ------------------------------------------- */
.phone-frame {
  width: 260px;
  height: 520px;
  background: linear-gradient(180deg, #111111, #1a1a1a);
  border: 1px solid var(--border);
  border-radius: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  overflow: hidden;
  position: relative;
  transform: rotate(3deg);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.4),
    0 8px 32px rgba(0, 0, 0, 0.3);
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 36px;
}

.phone-frame__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.phone-frame__placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.3;
}

/* Warm radial glow behind phone */
.phone-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.phone-frame {
  position: relative;
  z-index: 1;
}

/* Standalone feature-phone between feature sections */
.feature-phone {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: var(--space-4xl) 0;
}

.feature-phone .phone-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
  .phone-frame {
    width: 220px;
    height: 440px;
    border-radius: 30px;
    transform: none;
  }

  .phone-frame img {
    border-radius: 30px;
  }
}


/* --- Bold Statement ---------------------------------------- */
.bold-statement {
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 100px 0;
}

.bold-statement__text {
  max-width: var(--content-width);
  margin: 0 auto;
  color: var(--text);
}

@media (max-width: 768px) {
  .bold-statement {
    padding: 64px 0;
  }
}


/* --- Features (editorial layout) --------------------------- */
.feature {
  padding: var(--space-section) 0;
}

.feature:nth-child(odd) {
  background: var(--surface);
}

.feature:nth-child(even) {
  background: var(--bg);
}

.feature__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.feature__label {
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.feature__title {
  color: var(--text);
  max-width: 560px;
}

.feature__desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 520px;
  margin-top: var(--space-lg);
}

@media (max-width: 768px) {
  .feature {
    padding: var(--space-section) 0;
  }
}


/* --- Differentiators --------------------------------------- */
.diff {
  background: var(--surface);
}

.diff__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.diff__header .label {
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.diff__list {
  max-width: var(--content-width);
  margin: 0 auto;
}

.diff__item {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border);
}

.diff__item:last-child {
  border-bottom: none;
}

.diff__item-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.diff__item-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* --- Blog Preview ------------------------------------------ */
.blog-preview {
  background: var(--bg);
}

.blog-preview__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.blog-preview__header .label {
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.blog-preview__header .caption {
  color: var(--text-secondary);
  margin-top: var(--space-sm);
}

.blog-preview__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.blog-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: background var(--duration-quick) ease-out;
}

.blog-card:hover {
  background: var(--surface-hover);
}

.blog-card__category {
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.blog-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.blog-card__meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.blog-preview__more {
  text-align: center;
  margin-top: var(--space-2xl);
}

.blog-preview__more a {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: opacity var(--duration-quick);
}

.blog-preview__more a:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .blog-preview__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}


/* --- Final CTA --------------------------------------------- */
.final-cta {
  text-align: center;
  padding: 160px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.final-cta__title {
  color: var(--text);
  max-width: 560px;
  margin: 0 auto;
}

.final-cta__subtitle {
  color: var(--text-secondary);
  margin-top: var(--space-md);
  font-size: 1rem;
}

.final-cta__actions {
  margin-top: var(--space-2xl);
}

@media (max-width: 768px) {
  .final-cta {
    padding: 100px 0;
  }
}


/* --- App Store Badge --------------------------------------- */
.app-store-link {
  display: inline-block;
  transition: transform var(--duration-quick) ease-out,
              opacity var(--duration-quick);
}

.app-store-link:hover {
  transform: scale(1.03);
  opacity: 0.9;
}

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

.app-store-link--footer {
  margin-top: var(--space-sm);
}

.app-store-link--footer img {
  height: 40px;
}


/* --- Footer ------------------------------------------------ */
.footer {
  background: var(--bg);
  color: var(--text-secondary);
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer__logo-icon img {
  height: 44px;
  width: auto;
}

.footer__logo-text {
  font-weight: 700;
  color: var(--text);
  font-size: 0.9375rem;
}

.footer__copyright {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer__columns {
  display: flex;
  gap: var(--space-4xl);
}

.footer__col-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.footer__col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  transition: color var(--duration-quick);
}

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

@media (max-width: 768px) {
  .footer__inner {
    flex-direction: column;
    gap: var(--space-2xl);
  }

  .footer__columns {
    gap: var(--space-3xl);
  }
}


/* --- Scroll Animations ------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }


/* --- Utilities --------------------------------------------- */
.text-accent    { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-dim       { color: var(--text-dim); }


/* --- Responsive / Reduced Motion Overrides ----------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-lg);
  }

  .nav__links {
    gap: var(--space-lg);
  }

  .nav__link {
    font-size: 0.8125rem;
  }

  .nav__cta {
    font-size: 0.75rem;
    padding: 6px 16px;
  }
}
