/* ─────────────────────────────────────────────────────────────────
   Adam's Suite — Dark Edition
   Palette: pitch black · cherry blossom gradient accents · white lines
   Type: Space Grotesk (headings) · Instrument Serif (display italic)
         DM Sans (body)
   ───────────────────────────────────────────────────────────────── */

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

/* ── Design Tokens ──────────────────────────────────────────────── */
:root {
  --bg:            #080808;
  --bg-alt:        #0d0d0d;
  --surface:       #111111;
  --surface-hover: #181818;

  --border:        rgba(255, 255, 255, 0.10);
  --border-mid:    rgba(255, 255, 255, 0.22);
  --border-sharp:  rgba(255, 255, 255, 0.65);

  --text:          #f0f0f0;
  --muted:         #7a7a7a;
  --muted-light:   #4a4a4a;

  /* Cherry blossom accent */
  --pink:          #FF80B5;
  --purple:        #C084FC;
  --blossom:       linear-gradient(135deg, #FF80B5 0%, #C084FC 100%);
  --blossom-glow:  rgba(255, 128, 181, 0.18);

  /* Status colours */
  --live-fg:       #FF80B5;
  --live-bg:       rgba(255, 128, 181, 0.10);
  --live-border:   rgba(255, 128, 181, 0.28);

  --dev-fg:        #FB923C;
  --dev-bg:        rgba(251, 146, 60, 0.10);
  --dev-border:    rgba(251, 146, 60, 0.28);

  --soon-fg:       #555555;
  --soon-bg:       rgba(255, 255, 255, 0.04);
  --soon-border:   rgba(255, 255, 255, 0.10);

  --font-grotesk:  'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-serif:    'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-sans:     'DM Sans', system-ui, -apple-system, sans-serif;

  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Base ───────────────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; }

/* ── Grain overlay ──────────────────────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 160px;
  background-repeat: repeat;
}

/* ── Container ──────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 36px;
}

/* ── Section Label ──────────────────────────────────────────────── */
.section-label {
  display: block;
  font-family: var(--font-grotesk);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ─────────────────────────────────────────────────────────────────
   BUTTONS — Neo-brutalist 3D popout style
   ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-grotesk);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition:
    transform  0.12s ease,
    box-shadow 0.12s ease;
}

/* Primary: white with pink-glow popout shadow */
.btn--primary {
  background: #ffffff;
  color: #080808;
  border-color: #ffffff;
  box-shadow: 5px 5px 0 var(--pink);
}
.btn--primary:hover {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 var(--pink);
}
.btn--primary:active {
  transform: translate(6px, 6px);
  box-shadow: 0 0 0 var(--pink);
}

/* Ghost: dark transparent with white border */
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-mid);
  box-shadow: 5px 5px 0 rgba(255, 255, 255, 0.08);
}
.btn--ghost:hover {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 rgba(255, 255, 255, 0.08);
  border-color: var(--border-sharp);
}

/* ─────────────────────────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────────────────────────── */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-group {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.logo-sub {
  font-family: var(--font-grotesk);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-family: var(--font-grotesk);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.18s ease;
}
.header-nav a:hover { color: var(--text); }

.nav-contact {
  color: var(--text) !important;
  border: 1px solid var(--border-mid);
  padding: 7px 16px;
  border-radius: 2px;
  transition: border-color 0.18s ease, color 0.18s ease !important;
}
.nav-contact:hover {
  border-color: var(--border-sharp) !important;
}

/* ─────────────────────────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 110px 0 100px;
  position: relative;
  overflow: hidden;
  min-height: 540px;
}

/* Cherry blossom canvas — full hero, non-interactive overlay */
.blossom-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Subtle gradient glows behind canvas */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.hero-glow--1 {
  top: -150px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255, 128, 181, 0.07) 0%, transparent 65%);
  animation: glow-pulse 8s ease-in-out infinite alternate;
}
.hero-glow--2 {
  bottom: -100px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.06) 0%, transparent 65%);
  animation: glow-pulse 10s ease-in-out infinite alternate-reverse;
}
@keyframes glow-pulse {
  from { opacity: 0.7; transform: scale(1); }
  to   { opacity: 1.0; transform: scale(1.08); }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 680px;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(56px, 9vw, 100px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: var(--text);
}

/* Gradient italic accent */
.hero-heading em {
  font-style: italic;
  background: linear-gradient(135deg, #86EFAC 0%, #4ADE80 45%, #22C55E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-body {
  font-size: 16px;
  line-height: 1.82;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-hint {
  font-family: var(--font-grotesk);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-top: 28px;
}

/* ─────────────────────────────────────────────────────────────────
   MARQUEE STRIP — inverted white bar (editorial break)
   ───────────────────────────────────────────────────────────────── */
.marquee-strip {
  background: #ffffff;
  color: #080808;
  overflow: hidden;
  height: 46px;
  display: flex;
  align-items: center;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
  will-change: transform;
}

.marquee-track span {
  font-family: var(--font-grotesk);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0 22px;
}

.marquee-track .sep {
  color: rgba(0, 0, 0, 0.28);
  padding: 0;
  font-weight: 400;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─────────────────────────────────────────────────────────────────
   PRODUCTS SECTION
   ───────────────────────────────────────────────────────────────── */
.products-section {
  padding: 72px 0 88px;
  background: #f5f1e8;
  color: #171717;
}

.products-section .section-header {
  border-bottom-color: rgba(23, 23, 23, 0.18);
}

.products-section .section-label {
  color: rgba(23, 23, 23, 0.62);
}

.products-section .section-note {
  color: rgba(23, 23, 23, 0.74);
}

.section-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.section-note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  font-family: var(--font-sans);
}

/* ── Products Grid ──────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border-mid);
  overflow: hidden;
}

/* ── Product Card ───────────────────────────────────────────────── */
.product-card {
  padding: 30px 28px 26px;
  border-right:  1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;

  margin-right: -1px;
  margin-bottom: -1px;

  transition:
    background  0.24s var(--ease-out),
    transform   0.24s var(--ease-out),
    box-shadow  0.24s var(--ease-out);
}

.product-card:hover {
  background: var(--surface-hover);
  transform: translateY(-4px);
  box-shadow:
    0 24px 64px rgba(255, 128, 181, 0.10),
    0  0   0 1px rgba(255, 128, 181, 0.16);
  z-index: 2;
}

/* Gradient top-line for live cards */
.card-accent-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blossom);
  opacity: 0;
  transition: opacity 0.24s ease;
}
.product-card:hover .card-accent-line {
  opacity: 1;
}
.card--live .card-accent-line {
  opacity: 0.55;
}

/* ── Card Internals ─────────────────────────────────────────────── */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-category {
  font-family: var(--font-grotesk);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-light);
}

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
  font-family: var(--font-grotesk);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge--live {
  background: var(--live-bg);
  color: var(--live-fg);
  border: 1px solid var(--live-border);
}

.badge--dev {
  background: var(--dev-bg);
  color: var(--dev-fg);
  border: 1px solid var(--dev-border);
}

.badge--soon {
  background: var(--soon-bg);
  color: var(--soon-fg);
  border: 1px solid var(--soon-border);
}

/* ── Card Name ──────────────────────────────────────────────────── */
.card-name {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text);
}

/* ── Card Description ───────────────────────────────────────────── */
.card-desc {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.74;
  color: var(--muted);
  flex: 1;
}

/* ── Card Link ── popout button ─────────────────────────────────── */
.card-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-grotesk);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  padding: 9px 16px;
  border: 1.5px solid var(--border-mid);
  margin-top: auto;
  align-self: flex-start;
  box-shadow: 3px 3px 0 var(--pink);
  transition:
    transform   0.11s ease,
    box-shadow  0.11s ease,
    border-color 0.11s ease;
}
.card-link:hover {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--pink);
  border-color: var(--border-sharp);
}

.card-link--quiet {
  color: var(--dev-fg);
  box-shadow: 3px 3px 0 var(--dev-fg);
}
.card-link--quiet:hover {
  box-shadow: 0 0 0 var(--dev-fg);
}

.card-link--dim {
  color: var(--muted);
  box-shadow: 3px 3px 0 var(--muted-light);
}
.card-link--dim:hover {
  box-shadow: 0 0 0 var(--muted-light);
  color: var(--text);
}

/* ─────────────────────────────────────────────────────────────────
   ABOUT SECTION
   ───────────────────────────────────────────────────────────────── */
.about-section {
  background: var(--bg-alt);
  border-top:    1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 88px 0;
  position: relative;
  overflow: hidden;
}

/* Gradient bar on left edge */
.about-section::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--blossom);
  opacity: 0.6;
}

/* Soft glow in corner */
.about-section::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.05) 0%, transparent 65%);
  pointer-events: none;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-statement {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 18px;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 42px;
}

.about-right p {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.84;
  color: var(--muted);
}

/* ─────────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 26px 0;
  border-top: 1px solid var(--border);
}

.matt-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 950;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.matt-popup-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.matt-popup {
  width: min(92vw, 420px);
  border: 1px solid var(--border-sharp);
  background: linear-gradient(180deg, rgba(255, 128, 181, 0.13) 0%, rgba(12, 12, 12, 0.96) 35%, rgba(12, 12, 12, 0.99) 100%);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.55);
  padding: 22px 18px 18px;
  position: relative;
}

.matt-popup::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--blossom);
}

.matt-popup-kicker {
  font-family: var(--font-grotesk);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.matt-popup-title {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #fff;
}

.matt-popup-body {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.matt-popup-okay {
  margin-top: 16px;
  font-family: var(--font-grotesk);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #080808;
  background: #fff;
  border: 1px solid #fff;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--pink);
  transition: transform 0.11s ease, box-shadow 0.11s ease;
}

.matt-popup-okay:hover {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--pink);
}

.matt-popup-close {
  position: absolute;
  top: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-mid);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-family: var(--font-grotesk);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: left 0.14s var(--ease-spring), right 0.14s var(--ease-spring), transform 0.14s var(--ease-spring), border-color 0.14s ease;
}

.matt-popup-close:hover {
  border-color: var(--border-sharp);
  transform: scale(1.05);
}

.matt-popup-close--right { right: 10px; left: auto; }
.matt-popup-close--left  { left: 10px; right: auto; }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
}

.footer-year {
  font-family: var(--font-grotesk);
  font-size: 11px;
  color: var(--muted-light);
  letter-spacing: 0.08em;
}

/* ─────────────────────────────────────────────────────────────────
   APP DETAIL PAGES
   ───────────────────────────────────────────────────────────────── */
.app-page {
  background: linear-gradient(180deg, #0a0a0a 0%, #111111 100%);
}

.app-shell {
  padding: 52px 0 88px;
}

.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.app-back {
  font-family: var(--font-grotesk);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

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

.app-pill {
  font-family: var(--font-grotesk);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border-mid);
  padding: 4px 10px;
}

.app-card {
  border: 1px solid var(--border-mid);
  background: rgba(17, 17, 17, 0.86);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.app-hero {
  padding: 28px;
  border-bottom: 1px solid var(--border);
}

.app-name {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.app-tagline {
  margin-top: 14px;
  max-width: 740px;
  font-size: 18px;
  color: #d5d5d5;
}

.app-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.app-block {
  padding: 24px 28px 30px;
}

.app-block + .app-block {
  border-left: 1px solid var(--border);
}

.app-block h2 {
  font-family: var(--font-grotesk);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d9d9d9;
  margin-bottom: 10px;
}

.app-block p,
.app-block li {
  font-size: 15px;
  line-height: 1.72;
  color: #9f9f9f;
}

.app-list {
  padding-left: 18px;
}

.app-list li + li {
  margin-top: 6px;
}

.repo-meta {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  font-size: 13px;
  color: #8d8d8d;
}

/* ─────────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .about-right {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .hero {
    padding: 72px 0 64px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .header-nav {
    display: none;
  }

  .logo-sub {
    display: none;
  }

  .product-card {
    padding: 24px 20px;
  }

  .products-section {
    padding: 52px 0 68px;
  }

  .about-section {
    padding: 60px 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-shell {
    padding: 36px 0 64px;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-block + .app-block {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .app-hero,
  .app-block {
    padding: 22px 20px;
  }
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
  .blossom-canvas,
  .marquee-track {
    display: none;
  }
  .btn,
  .card-link,
  .product-card {
    transition: none;
  }
}
