/* ==========================================================
   SUPERPULSE — Global Stylesheet
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ── Reset ─────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Design Tokens ─────────────────────────────────────── */

:root {
  --bg:           #F7F4EF;
  --bg-card:      #FFFFFF;
  --bg-subtle:    #EDE9E2;
  --text:         #1A1814;
  --text-muted:   #7A736B;
  --text-faint:   #B5ADA5;
  --accent:       #C85C35;
  --accent-dim:   #F3E8E2;
  --border:       #E5DFD8;
  --border-dark:  #CEC7BF;

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  --r-sm:  6px;
  --r-md:  14px;
  --r-lg:  22px;
  --r-xl:  28px;

  --max-w:   1120px;
  --nav-h:   62px;

  --ease-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Base ──────────────────────────────────────────────── */

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ────────────────────────────────────────────── */

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* ── Animations ────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scaleY(1); }
  50%       { transform: scaleY(var(--scale, 0.35)); }
}

.anim {
  opacity: 0;
  animation: fadeUp 0.85s var(--ease-expo) forwards;
}

.anim-d1  { animation-delay: 0.08s; }
.anim-d2  { animation-delay: 0.18s; }
.anim-d3  { animation-delay: 0.30s; }
.anim-d4  { animation-delay: 0.44s; }
.anim-d5  { animation-delay: 0.58s; }
.anim-d6  { animation-delay: 0.72s; }

/* ── Navigation ────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(247, 244, 239, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.nav__logo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav__links a {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--text);
}

/* ── Hero ──────────────────────────────────────────────── */

.hero {
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  position: relative;
  overflow: hidden;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.025em;
  max-width: 22ch;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.hero__sub {
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  color: var(--text-muted);
  max-width: 46ch;
  line-height: 1.7;
  font-weight: 300;
}

/* Waveform decoration */
.hero__deco {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(640px, 52vw);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: clamp(1.25rem, 5vw, 3rem);
  pointer-events: none;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 220px;
  opacity: 0.09;
}

.waveform__bar {
  width: 5px;
  border-radius: 99px;
  background: var(--text);
  flex-shrink: 0;
  transform-origin: center;
  animation: pulse var(--dur, 1.8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* ── Apps Section ──────────────────────────────────────── */

.apps {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.apps__header {
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
  margin-bottom: 2.5rem;
}

.section__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section__tally {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--text-faint);
  font-style: italic;
}

.apps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 1.25rem;
}

/* ── App Card ──────────────────────────────────────────── */

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.875rem;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.35s var(--ease-expo),
    transform  0.35s var(--ease-expo),
    border-color 0.2s ease;
}

.app-card:hover {
  box-shadow: 0 16px 48px rgba(26, 24, 20, 0.08);
  transform: translateY(-4px);
  border-color: var(--border-dark);
}

.app-card__title-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.875rem;
}

.app-card__title-row .app-card__name {
  min-width: 0;
}

.app-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--accent-dim);
}

.app-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-card__platform-badge {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--bg);
}

.app-card__name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
}

.app-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-weight: 300;
  flex: 1;
  margin-bottom: 1.625rem;
}

.app-card__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 1.375rem;
  border-top: 1px solid var(--border);
}

/* Store Buttons */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.5rem 0.875rem 0.5rem 0.75rem;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  transition:
    background 0.2s ease,
    transform  0.15s var(--ease-spring);
}

.store-btn:hover {
  background: #302B26;
  transform: scale(1.03);
}

.store-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Coming soon badge */
.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-faint);
  font-style: italic;
  font-family: var(--font-display);
}

/* ── Footer ────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-faint);
  font-weight: 300;
}

.footer__links {
  display: flex;
  gap: 1.75rem;
}

.footer__links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--accent);
}

/* ── Legal Pages ───────────────────────────────────────── */

.legal {
  padding-block: clamp(3rem, 7vw, 5rem);
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 3.5rem;
  transition: color 0.2s ease, gap 0.2s var(--ease-expo);
}

.legal__back:hover {
  color: var(--text);
  gap: 0.6rem;
}

.legal__back svg {
  width: 14px;
  height: 14px;
}

.legal__header {
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.legal__tag {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.legal__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 0.95;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.legal__meta {
  font-size: 0.8125rem;
  color: var(--text-faint);
  font-weight: 300;
}

.legal__body {
  max-width: 68ch;
}

.legal__body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2.75rem;
  margin-bottom: 0.875rem;
  color: var(--text);
}

.legal__body h3 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-top: 1.5rem;
  margin-bottom: 0.625rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.legal__body .placeholder {
  background: #FEF3CD;
  border: 1px solid #F5C842;
  border-radius: 3px;
  padding: 0.1em 0.4em;
  font-size: 0.8125rem;
  font-weight: 500;
  font-style: normal;
  color: #7A5F00;
}

.legal__body p {
  font-size: 0.9375rem;
  color: #574F48;
  line-height: 1.8;
  margin-bottom: 1rem;
  font-weight: 300;
}

.legal__body ul {
  margin-bottom: 1rem;
  padding-left: 1.375rem;
}

.legal__body li {
  font-size: 0.9375rem;
  color: #574F48;
  line-height: 1.8;
  margin-bottom: 0.375rem;
  font-weight: 300;
  list-style: disc;
}

.legal__body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal__body strong {
  font-weight: 500;
  color: var(--text);
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 768px) {
  .mission__inner {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .hero__deco {
    display: none;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .nav__links {
    gap: 1.25rem;
  }

  .app-card {
    padding: 1.5rem;
  }
}
