/* ============================================================
   AURUM — Stile "Italian Editorial"
   Palette: Ivory · Near-black · Gold
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

/* ============================================================
   0. Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ============================================================
   1. Design Tokens
   ============================================================ */
:root {
  /* Palette */
  --cream:         #F4EDE0;
  --cream-alt:     #EBE2D2;
  --gold:          #B8831F;
  --gold-muted:    rgba(184, 131, 31, 0.10);
  --gold-border:   rgba(184, 131, 31, 0.22);
  --ink:           #0E0B08;
  --ink-2:         #4A4035;
  --ink-3:         #9A8E7D;
  --navy:          #0C1724;
  --navy-mid:      #14263D;
  --on-dark:       #F0EBE2;
  --on-dark-dim:   rgba(240, 235, 226, 0.55);

  /* Fonts */
  --font-d: 'Cormorant Garamond', Georgia, serif;
  --font-b: 'DM Sans', system-ui, sans-serif;

  /* Spacing (8px base) */
  --s1: 0.25rem;  --s2: 0.5rem;   --s3: 0.75rem;  --s4: 1rem;
  --s6: 1.5rem;   --s8: 2rem;     --s10: 2.5rem;  --s12: 3rem;
  --s16: 4rem;    --s20: 5rem;    --s24: 6rem;    --s32: 8rem;

  /* Motion */
  --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
  --ease-in:  cubic-bezier(0.4, 0, 1, 1);
  --t:   280ms;
  --t-s: 180ms;
  --t-l: 520ms;
}

/* ============================================================
   2. Base
   ============================================================ */
html {
  background: var(--cream);
  color: var(--ink);
}
body {
  font-family: var(--font-b);
  font-size: 1rem;
  line-height: 1.62;
  overflow-x: hidden;
}

/* ============================================================
   3. Utilities
   ============================================================ */
.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--s6);
}
@media (min-width: 768px) { .container { padding-inline: var(--s8); } }

.label {
  display: inline-block;
  font-family: var(--font-b);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s4);
}

/* ============================================================
   4. Grain Texture
   ============================================================ */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ============================================================
   5. Scroll Animations
   ============================================================ */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-l) var(--ease-out),
              transform var(--t-l) var(--ease-out);
}
[data-animate][data-animate-delay="1"] { transition-delay: 80ms; }
[data-animate][data-animate-delay="2"] { transition-delay: 160ms; }
[data-animate][data-animate-delay="3"] { transition-delay: 240ms; }
[data-animate][data-animate-delay="4"] { transition-delay: 320ms; }
[data-animate].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  [data-animate] { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   6. Navigation
   ============================================================ */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 200;
  height: 64px;
  background: rgba(244, 237, 224, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease-out);
}
.nav.is-scrolled {
  border-bottom-color: var(--gold-border);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--font-d);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.nav__logo img { width: 32px; height: 32px; border-radius: 8px; }

.nav__links {
  display: none;
  align-items: center;
  gap: var(--s8);
}
@media (min-width: 720px) { .nav__links { display: flex; } }

.nav__links li a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color var(--t-s);
}
.nav__links li a:hover { color: var(--ink); }

.nav__cta {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
  background: var(--gold-muted);
  border: 1px solid var(--gold-border);
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  transition: background var(--t-s), color var(--t-s) !important, border-color var(--t-s);
}
.nav__cta:hover {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #fff !important;
}

.nav__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 6px;
}
@media (min-width: 720px) { .nav__hamburger { display: none; } }

.nav__hamburger span {
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t) var(--ease-out), opacity var(--t) var(--ease-out);
  transform-origin: center;
}
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav__mobile {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset-block-start: 64px;
  inset-inline: 0;
  background: var(--cream);
  border-bottom: 1px solid var(--gold-border);
  padding: var(--s4) var(--s6) var(--s6);
  gap: var(--s1);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--t) var(--ease-out), opacity var(--t) var(--ease-out);
  z-index: 199;
}
.nav__mobile.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }

.nav__mobile a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--gold-border);
  transition: color var(--t-s);
}
.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile a:hover { color: var(--ink); }

.nav__mobile .mobile-download {
  color: var(--gold) !important;
  font-weight: 600 !important;
  border-bottom: none;
}

/* ============================================================
   7. Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  background: var(--cream);
  overflow: hidden;
}

/* Giant background word — decorative editorial element */
.hero__bg-word {
  position: absolute;
  bottom: -0.1em;
  right: -0.04em;
  font-family: var(--font-d);
  font-size: clamp(9rem, 22vw, 20rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(184, 131, 31, 0.09);
  letter-spacing: -0.02em;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

/* Thin gold line — top of hero */
.hero::before {
  content: '';
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-border) 30%, var(--gold-border) 70%, transparent 100%);
}

/* Bottom separator */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--s8);
  right: var(--s8);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s12);
  align-items: center;
  padding-block: var(--s16) var(--s20);
  width: 100%;
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--s10);
    padding-block: var(--s20);
  }
}

/* Content */
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-b);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s6);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  animation: dot-pulse 2.8s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.65); }
}

.hero__title {
  font-family: var(--font-d);
  font-size: clamp(2.8rem, 7.5vw, 5.5rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: var(--s6);
}
.hero__title em {
  font-style: italic;
  color: var(--gold);
}

.hero__desc {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 44ch;
  margin-bottom: var(--s10);
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s4);
}

.hero__note {
  font-size: 0.8125rem;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Visual */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__phone {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 300px;
  border-radius: 36px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(14,11,8,0.07),
    0 20px 50px rgba(14,11,8,0.18),
    0 6px 16px rgba(14,11,8,0.10);
  transform: rotate(2.5deg);
  transition: transform var(--t) var(--ease-out);
}
.hero__phone:hover { transform: rotate(0deg) translateY(-4px); }
.hero__phone img { width: 100%; display: block; }

.hero__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.hero__deco-ring {
  position: absolute;
  top: 5%;
  right: -15%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
}
.hero__deco-dot {
  position: absolute;
  bottom: 10%;
  left: 5%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.4;
}

/* ============================================================
   8. Features — Editorial Numbered List
   ============================================================ */
.features {
  position: relative;
  padding: var(--s24) 0;
  background: var(--cream);
  overflow: hidden;
}

.features__header {
  margin-bottom: var(--s16);
}

.features__title {
  font-family: var(--font-d);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.18;
  color: var(--ink);
  max-width: 20ch;
  letter-spacing: -0.01em;
}
.features__title em { font-style: italic; color: var(--gold); }

.features__list {
  border-top: 1px solid var(--gold-border);
}

.feature-row {
  display: grid;
  grid-template-columns: 3rem 1fr 2.5rem;
  align-items: center;
  gap: var(--s4);
  padding: var(--s6) 0;
  border-bottom: 1px solid var(--gold-border);
  transition: background var(--t-s), padding-inline var(--t-s);
}

@media (min-width: 640px) {
  .feature-row { grid-template-columns: 4.5rem 1fr 3rem; gap: var(--s8); }
}

@media (min-width: 768px) {
  .feature-row { padding: var(--s8) var(--s6); }
  .feature-row:hover {
    background: var(--gold-muted);
    border-radius: 10px;
    margin-inline: calc(-1 * var(--s6));
    padding-inline: var(--s10);
  }
}

.feature-row__num {
  font-family: var(--font-d);
  font-size: 1.0625rem;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.06em;
  line-height: 1;
  opacity: 0.8;
}

.feature-row__body h3 {
  font-family: var(--font-d);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--s2);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.feature-row__body p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 52ch;
}

.feature-row__icon {
  display: flex;
  justify-content: flex-end;
  color: var(--gold);
  opacity: 0.45;
  transition: opacity var(--t-s);
}
.feature-row:hover .feature-row__icon { opacity: 0.75; }
.feature-row__icon svg { width: 26px; height: 26px; }

/* ============================================================
   9. Screenshots — Staggered Magazine Layout
   ============================================================ */
.screenshots {
  position: relative;
  padding: var(--s24) 0 var(--s32);
  background: var(--cream-alt);
  overflow: hidden;
}

.screenshots::before,
.screenshots::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}
.screenshots::before { top: 0; }
.screenshots::after  { bottom: 0; }

.screenshots__header {
  margin-bottom: var(--s16);
}
.screenshots__header h2 {
  font-family: var(--font-d);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: var(--s4);
  letter-spacing: -0.01em;
}
.screenshots__header h2 em { font-style: italic; color: var(--gold); }
.screenshots__header p {
  font-size: 1.0625rem;
  color: var(--ink-2);
  max-width: 46ch;
  line-height: 1.65;
}

/* 3-column staggered */
.screenshots__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s8);
}
@media (min-width: 600px) {
  .screenshots__grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    gap: var(--s6);
  }
}

.screenshot-item {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(14,11,8,0.10), 0 1px 4px rgba(14,11,8,0.06);
  transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out);
  position: relative;
  background: var(--cream);
}
.screenshot-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(14,11,8,0.15), 0 4px 12px rgba(14,11,8,0.08);
}

/* Stagger vertical offsets for magazine feel */
@media (min-width: 600px) {
  .screenshot-item--1 { margin-top: 0; }
  .screenshot-item--2 { margin-top: 3.5rem; }
  .screenshot-item--3 { margin-top: 1.75rem; }
}

.screenshot-item img { width: 100%; display: block; }

.screenshot-item__label {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  padding: var(--s8) var(--s4) var(--s4);
  background: linear-gradient(to top, rgba(14,11,8,0.72) 0%, transparent 100%);
  color: #fff;
}
.screenshot-item__label strong {
  display: block;
  font-family: var(--font-d);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
}
.screenshot-item__label span {
  display: block;
  font-size: 0.75rem;
  opacity: 0.75;
  margin-top: 2px;
}

/* ============================================================
   10. Download CTA
   ============================================================ */
.download {
  position: relative;
  padding: var(--s24) 0;
  background: var(--navy);
  overflow: hidden;
}

/* Radial gold glow — subtle, not generic */
.download::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  padding-top: 40%;
  background: radial-gradient(ellipse at center, rgba(184,131,31,0.13) 0%, transparent 68%);
  pointer-events: none;
}

/* Gold hairline on top */
.download::after {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184,131,31,0.4), transparent);
}

.download__inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.download__inner .label {
  color: rgba(184, 131, 31, 0.75);
}

.download__inner h2 {
  font-family: var(--font-d);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 1.08;
  color: var(--on-dark);
  letter-spacing: -0.02em;
  margin-block: var(--s6);
}
.download__inner h2 em {
  font-style: italic;
  color: var(--gold);
}

.download__inner p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--on-dark-dim);
  max-width: 42ch;
  margin: 0 auto var(--s10);
}

.download .btn-appstore-badge { margin-inline: auto; }

/* ============================================================
   11. App Store Badge
   ============================================================ */
.btn-appstore-badge {
  display: inline-block;
  cursor: pointer;
  transition: transform var(--t) var(--ease-out), opacity var(--t) var(--ease-out);
}
.btn-appstore-badge:hover { transform: translateY(-3px); opacity: 0.88; }
.btn-appstore-badge:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 12px;
}
.btn-appstore-badge img { height: 56px; width: auto; display: block; }

@media (max-width: 480px) { .btn-appstore-badge img { height: 50px; } }

/* ============================================================
   12. Footer
   ============================================================ */
.footer {
  background: var(--ink);
  color: var(--on-dark);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s12);
  padding-block: var(--s16) var(--s12);
}
@media (min-width: 680px) {
  .footer__inner { grid-template-columns: 1fr auto; gap: var(--s16); }
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--font-d);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--on-dark);
  margin-bottom: var(--s4);
}
.footer__logo img { width: 30px; height: 30px; border-radius: 7px; }

.footer__brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(240, 235, 226, 0.45);
  max-width: 28ch;
}

.footer__links { display: flex; gap: var(--s12); }

.footer__col h4 {
  font-family: var(--font-b);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 235, 226, 0.3);
  margin-bottom: var(--s4);
}
.footer__col a {
  display: block;
  font-size: 0.875rem;
  color: rgba(240, 235, 226, 0.55);
  margin-bottom: var(--s3);
  transition: color var(--t-s);
}
.footer__col a:hover { color: var(--on-dark); }

.footer__bottom {
  border-top: 1px solid rgba(240, 235, 226, 0.08);
  padding-block: var(--s6);
}
.footer__bottom .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3);
}
.footer__bottom span {
  font-size: 0.75rem;
  color: rgba(240, 235, 226, 0.25);
}

/* CSP: utility per rimuovere inline styles in privacy/terms */
.footer__bottom--centered { justify-content: center; }
.footer__bottom--centered .container { justify-content: center; }
.link--legal { color: inherit; text-decoration: underline; }
