/* index.html — Landing page
   Depends on: base.css
   Requires: Google Fonts (Playfair Display + DM Sans via @import)
   Note: This page has its own unique nav — NOT the standard .topbar
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Page-level overrides ─────────────────────────────────────────────────── */
:root {
  --bg:      #0a0a09;
  --surface: #131310;
  --surface2:#1c1c18;
  --surface3:#252520;
  --border:  #2a2a24;
  --border2: #353530;
  --text:    #f0ede5;
  --text2:   #c8c4bb;
  --muted:   #787570;
}

html { scroll-behavior: smooth }
body { font-family: 'DM Sans', sans-serif; overflow-x: hidden }

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: .5;
}

/* ── Fixed nav (unique to landing page) ───────────────────────────────────── */
nav.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 70px;
  overflow: visible;
  background: rgba(10,10,9,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  flex-shrink: 0;
  align-self: flex-start;
  transition: transform .2s ease;
}
.nav-logo:hover { transform: translateY(-3px) rotate(-1deg) }
.nav-logo img {
  height: 150px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.5));
}
.logo-spacer { height: 80px }
.nav-brand { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--accent); letter-spacing: .02em; display: flex; align-items: center; gap: .6rem }
.nav-right  { display: flex; align-items: center; gap: .75rem }
.nav-link   { font-size: .82rem; font-weight: 500; color: var(--muted); text-decoration: none; padding: .4rem .9rem; border-radius: 6px; border: 1px solid transparent; transition: all .2s }
.nav-link:hover { color: var(--text); border-color: var(--border2) }
.nav-cta    { font-size: .82rem; font-weight: 600; background: var(--accent); color: #111; border: none; padding: .45rem 1.1rem; border-radius: 6px; cursor: pointer; text-decoration: none; transition: background .2s }
.nav-cta:hover { background: var(--accent2) }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 7rem 2rem 4rem; overflow: hidden }
.hero-bg  { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .12; pointer-events: none }
.c1 { width: 700px; height: 700px; background: radial-gradient(circle, #c8a96e, transparent 70%); top: -200px; right: -200px }
.c2 { width: 500px; height: 500px; background: radial-gradient(circle, #7cb9a8, transparent 70%); bottom: -100px; left: -100px }

.hero-inner { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center }

.hero-label { font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.2rem; display: flex; align-items: center; gap: .6rem }
.hero-label::before { content: ''; display: block; width: 24px; height: 1px; background: var(--accent) }

h1      { font-family: 'Playfair Display', serif; font-size: clamp(2.8rem, 5vw, 4.2rem); font-weight: 900; line-height: 1.1; color: var(--text); margin-bottom: 1.5rem }
h1 em   { font-style: italic; color: var(--accent) }

.hero-body    { font-size: 1rem; line-height: 1.7; color: var(--text2); margin-bottom: 2rem; max-width: 480px }
.hero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap }

/* "What's new" pill above the hero CTAs — a soft callout to surface
   the latest shipped feature to logged-out visitors. Anchors to the
   features section so a click drops them at the matching card. */
.new-feature-pill {
  display: inline-flex; align-items: center; gap: .55rem;
  margin-bottom: 1.4rem; max-width: 520px;
  padding: .55rem .9rem;
  background: linear-gradient(135deg, rgba(200,169,110,.14), rgba(200,169,110,.06));
  border: 1px solid rgba(200,169,110,.35);
  border-radius: 999px;
  color: var(--text); font-size: .88rem; font-weight: 500;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.new-feature-pill:hover { border-color: var(--accent); transform: translateY(-1px) }
.new-feature-pill-badge {
  background: var(--accent); color: #111;
  font-size: .65rem; font-weight: 800; letter-spacing: .12em;
  padding: .15rem .5rem; border-radius: 999px;
  flex-shrink: 0;
}
.new-feature-pill-icon  { font-size: 1.05rem; line-height: 1 }
.new-feature-pill-text  { color: var(--text2) }
.new-feature-pill-arrow { color: var(--accent); font-weight: 700; margin-left: auto }

.btn-primary { background: var(--accent); color: #111; padding: .75rem 1.8rem; border-radius: 8px; border: none; font-size: .95rem; font-weight: 700; font-family: 'DM Sans', sans-serif; text-decoration: none; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: .5rem }
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px) }

.btn-ghost  { background: none; color: var(--text2); padding: .75rem 1.4rem; border-radius: 8px; border: 1px solid var(--border2); font-size: .9rem; font-weight: 500; font-family: 'DM Sans', sans-serif; text-decoration: none; cursor: pointer; transition: all .2s }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent) }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .1rem; margin-top: 3rem }
.stat-item  { padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border) }
.stat-item:first-child { border-radius: 10px 0 0 10px }
.stat-item:last-child  { border-radius: 0 10px 10px 0 }
.stat-num   { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; color: var(--accent); display: block }
.stat-lbl   { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .09em }

/* ── Cap mosaic ───────────────────────────────────────────────────────────── */
.cap-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem }
.cap-mosaic-item { aspect-ratio: 1; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; transition: transform .3s; position: relative }
.cap-mosaic-item:hover { transform: scale(1.03) }
.cap-mosaic-item img   { width: 100%; height: 100%; object-fit: cover }
.cap-mosaic-item.featured { grid-column: span 2; grid-row: span 2; font-size: 4rem }
.season-dot { position: absolute; bottom: .5rem; left: .5rem; font-size: .6rem; padding: .2rem .5rem; border-radius: 8px; background: rgba(0,0,0,.6); color: var(--accent) }

/* ── Sections ─────────────────────────────────────────────────────────────── */
section { position: relative; z-index: 1 }
.section-inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem }

.section-label { font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin-bottom: .9rem; display: flex; align-items: center; gap: .6rem }
.section-label::before { content: ''; display: block; width: 18px; height: 1px; background: var(--teal) }

h2 { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; color: var(--text); margin-bottom: 1rem }

.section-body { font-size: .95rem; line-height: 1.7; color: var(--text2); max-width: 580px; margin-bottom: 2.5rem }

.features-section,
.catalog-section,
.points-section { padding: 6rem 0; border-top: 1px solid var(--border) }

/* ── Features ─────────────────────────────────────────────────────────────── */
.features-grid  { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem }
.feature-card   { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.75rem; transition: border-color .2s, transform .2s; position: relative }
.feature-card:hover { border-color: var(--border2); transform: translateY(-2px) }
.feature-icon   { font-size: 1.8rem; margin-bottom: 1rem; display: block }
.feature-title  { font-weight: 600; font-size: .95rem; color: var(--text); margin-bottom: .5rem }
.feature-desc   { font-size: .83rem; line-height: 1.6; color: var(--muted) }

/* New-feature highlight — gold border + subtle gold glow + corner badge.
   Used on the most recently shipped feature so it stands out among the
   broader feature grid. */
.feature-card-new {
  border-color: rgba(200,169,110,.45);
  background: linear-gradient(180deg, rgba(200,169,110,.06), var(--surface));
  box-shadow: 0 2px 30px -10px rgba(200,169,110,.25);
}
.feature-new-badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--accent); color: #111;
  font-size: .62rem; font-weight: 800; letter-spacing: .14em;
  padding: .15rem .5rem; border-radius: 999px;
}

/* ── Catalog preview ──────────────────────────────────────────────────────── */
.catalog-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem }
.catalog-grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem }

.preview-card   { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: border-color .2s, transform .15s }
.preview-card:hover { border-color: var(--accent); transform: translateY(-2px) }
.preview-img    { aspect-ratio: 1; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 3.5rem; overflow: hidden; position: relative }
.preview-img img{ width: 100%; height: 100%; object-fit: cover }
.preview-season { position: absolute; top: .5rem; left: .5rem; font-size: .62rem; font-weight: 600; padding: .2rem .5rem; border-radius: 8px }
.preview-body   { padding: .85rem }
.preview-name   { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .3rem }
.preview-owner  { font-size: .72rem; color: var(--muted); margin-bottom: .5rem }
.preview-colors { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .5rem }
.preview-color-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15) }
.preview-footer { display: flex; justify-content: space-between; align-items: center; font-size: .7rem; color: var(--muted) }

.login-to-add { font-size: .7rem; color: var(--teal); background: rgba(124,185,168,.1); border: 1px solid rgba(124,185,168,.2); padding: .25rem .6rem; border-radius: 5px; text-decoration: none; white-space: nowrap; transition: background .2s }
.login-to-add:hover { background: rgba(124,185,168,.2) }

.catalog-cta { margin-top: 2rem; text-align: center; padding: 2rem; background: var(--surface); border: 1px dashed var(--border2); border-radius: 12px }
.catalog-cta p { color: var(--muted); font-size: .9rem; margin-bottom: 1rem }

/* ── Season badge classes ─────────────────────────────────────────────────── */
.sp-spring    { background: rgba(120,190,100,.2); color: #78be64 }
.sp-summer    { background: rgba(230,180,50,.2);  color: #e6b432 }
.sp-fall      { background: rgba(210,120,50,.2);  color: #d27832 }
.sp-winter    { background: rgba(100,160,220,.2); color: #64a0dc }
.sp-all-season{ background: rgba(124,185,168,.2); color: #7cb9a8 }

/* ── Points / Milestones ──────────────────────────────────────────────────── */
.points-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start }

.milestone-list { display: flex; flex-direction: column; gap: .75rem }
.milestone-item { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; opacity: .7; transition: opacity .2s }
.milestone-item:hover { opacity: 1 }
.milestone-icon { font-size: 1.4rem; flex-shrink: 0 }
.milestone-info { flex: 1 }
.milestone-name { font-size: .85rem; font-weight: 600; color: var(--text) }
.milestone-desc { font-size: .75rem; color: var(--muted) }
.milestone-pts  { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--accent) }

.point-table     { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden }
.point-table-row { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.3rem; border-bottom: 1px solid var(--border) }
.point-table-row:last-child { border-bottom: none }
.point-action    { font-size: .88rem; color: var(--text2) }
.point-val       { font-weight: 700; color: var(--accent); background: rgba(200,169,110,.1); border: 1px solid rgba(200,169,110,.2); padding: .2rem .65rem; border-radius: 20px; font-size: .82rem }

/* ── Skeleton ─────────────────────────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px }
@keyframes shimmer { to { background-position: -200% 0 } }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 2.5rem 2rem; text-align: center; color: var(--muted); font-size: .8rem }
footer strong { color: var(--accent) }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: translateY(0) } }
.hero-label   { animation: fadeUp .5s ease both }
h1            { animation: fadeUp .55s .08s ease both }
.hero-body    { animation: fadeUp .55s .16s ease both }
.hero-actions { animation: fadeUp .55s .24s ease both }
.hero-stats   { animation: fadeUp .55s .36s ease both }
.hero-visual  { animation: fadeUp .7s .2s ease both }

/* ── Login modal ──────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .2s }
.modal-overlay.open { opacity: 1; pointer-events: all }
.login-card { background: #1a1a1a; border: 1px solid #333; border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: 0 24px 80px rgba(0,0,0,.8); transform: translateY(16px); transition: transform .25s }
.modal-overlay.open .login-card { transform: translateY(0) }

.login-logo         { text-align: center; margin-bottom: 1.75rem }
.login-logo-icon    { font-size: 2.5rem; display: block; margin-bottom: .4rem }
.login-logo h2      { font-size: 1.3rem; color: var(--accent); margin-bottom: .2rem }
.login-logo p       { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em }

.login-group        { margin-bottom: 1.1rem }
.login-group label  { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .35rem }
.login-group input  { width: 100%; background: #242424; border: 1px solid #333; color: #f0ece4; padding: .7rem 1rem; border-radius: 8px; font-size: .95rem; font-family: inherit; transition: border-color .2s }
.login-group input:focus { outline: none; border-color: var(--accent) }

.login-btn  { width: 100%; background: var(--accent); color: #111; border: none; padding: .8rem; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .2s; margin-top: .5rem }
.login-btn:hover    { background: var(--accent2) }
.login-btn:disabled { opacity: .5; cursor: default }
.login-error { color: #e05252; font-size: .83rem; margin-top: .65rem; text-align: center; min-height: 1.1rem }

.login-close { position: absolute; top: 1rem; right: 1.25rem; background: none; border: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; line-height: 1; padding: .25rem }
.login-close:hover { color: var(--text) }

/* ── Bottom tab bar (mobile) ─────────────────────────────────────────────── */
.bottom-nav { display: none }

@media (max-width: 640px) {
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)) }
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #111;
    border-top: 1px solid var(--border);
    z-index: 150;
  }
  .bottom-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; color: var(--muted);
    text-decoration: none; -webkit-tap-highlight-color: transparent; transition: color .15s;
  }
  .bottom-nav-item.active { color: var(--accent) }
  .bottom-nav-icon  { font-size: 1.25rem; line-height: 1 }
  .bottom-nav-label { font-size: .6rem; font-weight: 500; letter-spacing: .02em }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .hero-inner      { grid-template-columns: 1fr; gap: 2rem }
  .hero-visual     { display: none }
  .points-two-col  { grid-template-columns: 1fr }
}
@media (max-width: 520px) {
  .hero-stats      { grid-template-columns: 1fr }
  .stat-item:first-child { border-radius: 10px 10px 0 0 }
  .stat-item:last-child  { border-radius: 0 0 10px 10px }
  nav.topbar       { padding: 0 1rem; height: 56px }
  .nav-logo img    { height: 80px !important }
  .logo-spacer     { height: 24px }
  .wordmark        { display: none }
  .nav-link        { display: none }
  .hero            { padding: 6rem 1.25rem 3rem }
  .hero-body       { font-size: .92rem }
}

/* ── Landing extras (SSR'd "alive caps" + "community comments") ─────────── */
.landing-section            { padding: 4rem 0 }
.landing-section .section-inner { max-width: 1080px; margin: 0 auto; padding: 0 2rem }
.landing-section h2         { font-family: 'Playfair Display', serif; font-size: 2rem; line-height: 1.15; color: var(--text); margin: .35rem 0 .65rem }
.landing-section .section-body { color: var(--muted); font-size: .95rem; max-width: 620px; margin-bottom: 2rem }

.landing-alive { background: linear-gradient(180deg, transparent, rgba(200,169,110,.04)) }
.alive-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem }
.alive-card    { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .85rem; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; display: flex; flex-direction: column; gap: .35rem }
.alive-card:hover { border-color: var(--accent); transform: translateY(-2px) }
.alive-img     { width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; background: var(--surface2); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 2rem; border: 1px solid var(--border2); margin-bottom: .25rem }
.alive-img img { width: 100%; height: 100%; object-fit: cover }
.alive-name    { font-size: .95rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.alive-brand   { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.alive-meta    { font-size: .72rem; color: var(--accent); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-top: .35rem }

.community-comments { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1rem }
.community-comment  { display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; text-decoration: none; color: inherit; transition: border-color .15s }
.community-comment:hover { border-color: var(--accent) }
.cc-img    { width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px; background: var(--surface2); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; border: 1px solid var(--border2) }
.cc-img img { width: 100%; height: 100%; object-fit: cover }
.cc-body   { flex: 1; min-width: 0 }
.cc-meta   { font-size: .78rem; color: var(--muted); margin-bottom: .35rem }
.cc-meta strong { color: var(--text2) }
.cc-author       { color: var(--accent) }
.cc-author a     { color: var(--accent); text-decoration: none }
.cc-author a:hover { text-decoration: underline }
.cc-text   { font-size: .9rem; color: var(--text); line-height: 1.5; word-break: break-word }

@media (max-width: 640px) {
  .landing-section            { padding: 2.5rem 0 }
  .landing-section h2         { font-size: 1.5rem }
  .landing-section .section-inner { padding: 0 1.25rem }
  .alive-grid                 { grid-template-columns: repeat(2, 1fr) }
  .community-comments         { grid-template-columns: 1fr }
}
