/* =============================================================
   KRISKYLE STORE™ — styles.css
   Editorial / minimal / light. Mobile-first.
   Tune the look from the design tokens in :root below.
   ============================================================= */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Fonts (swap the families here + the <link> in index.html) */
  --font-display: "Inter", system-ui, sans-serif;   /* headings, body, prices, buttons */
  --font-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; /* small labels only */

  /* Colors — light editorial palette */
  --bg: #ffffff;
  --ink: #0a0a0a;          /* near-black text */
  --ink-soft: #6b6b6b;     /* muted/meta text */
  --line: #e6e6e6;         /* thin dividers */
  --line-strong: #0a0a0a;
  --surface: #f4f4f2;      /* subtle panels / covers bg */
  --accent: #ff4a1c;       /* restrained editorial accent */

  /* Spacing / layout — content is full-width with minimal equal side gutters */
  --gutter: 16px;          /* ~16px side gutters on every screen, near the edges */
  --header-h: 56px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 560ms;
}

/* ---------- RESET ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  /* clear the fixed transparent header at the top */
  padding-top: var(--header-h);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* Prevent horizontal scroll during slide transitions */
.view-stage { overflow-x: clip; }

/* =============================================================
   HEADER / NAV
   ============================================================= */
/* Transparent, seamless header that overlays the content.
   Slides up on scroll-down, reappears on scroll-up (class toggled in JS). */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: transparent;
  transition: transform 420ms var(--ease);
  will-change: transform;
}
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner {
  min-height: var(--header-h);
  padding: 16px var(--gutter) 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* Right-side cluster: nav + clock + mobile toggle */
.header-right {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  z-index: 2;
}
.logo-tm { font-size: 0.6em; vertical-align: super; font-weight: 600; }
.logo-img { height: 20px; width: auto; }

/* Nav links */
.site-nav {
  display: flex;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-nav a {
  position: relative;
  padding: 4px 0;
  color: var(--ink);
  opacity: 0.85;
  transition: opacity 200ms var(--ease);
}
.site-nav a:hover { opacity: 1; }
.site-nav a.is-active { opacity: 1; }
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--ink);
}

/* Live clock + city */
.header-clock {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-align: right;
  line-height: 1.25;
}
.header-clock span { display: block; }
.clock-city { color: var(--ink); }

/* Mobile nav toggle */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0 6px;
  background: transparent;
  border: 0;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: transform 300ms var(--ease), opacity 200ms var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* =============================================================
   VIEW STAGE + TRANSITIONS
   Views are stacked; one active. Non-active hidden via [hidden].
   Slide classes drive the seamless swap (added/removed by JS).
   ============================================================= */
.view-stage {
  position: relative;
  width: 100%;
  padding: 0 var(--gutter);
}

.view { will-change: transform, opacity; }
.view[hidden] { display: none; }

.view-scroll {
  padding-top: clamp(28px, 6vw, 72px);
  padding-bottom: clamp(40px, 8vw, 90px);
}

/* Enter animations (direction set by JS classes) */
.view.enter-right { animation: slideInRight var(--speed) var(--ease) both; }
.view.enter-left  { animation: slideInLeft  var(--speed) var(--ease) both; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .view.enter-right,
  .view.enter-left { animation: fadeIn 240ms ease both; }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
}

/* =============================================================
   SHARED PIECES
   ============================================================= */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.muted { color: var(--ink-soft); }

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(24px, 5vw, 56px);
}
.view-title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(44px, 12vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.view-count {
  font-family: var(--font-mono);
  font-size: 0.22em;
  font-weight: 400;
  vertical-align: super;
  color: var(--ink-soft);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 2px;   /* near-rectangular, editorial */
  transition: background 220ms var(--ease), color 220ms var(--ease), transform 120ms var(--ease);
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: color-mix(in srgb, var(--ink) 82%, var(--bg)); }

/* Small round play button (cards + hero) */
.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
  transition: background 200ms var(--ease), color 200ms var(--ease), transform 120ms var(--ease);
}
.play-btn:hover { background: var(--ink); color: var(--bg); }
.play-btn:active { transform: scale(0.96); }
.play-btn.is-playing { background: var(--accent); border-color: var(--accent); color: #fff; }

/* =============================================================
   HOME — HERO
   ============================================================= */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  padding-bottom: clamp(40px, 8vw, 96px);
  border-bottom: 1px solid var(--line);
}
.hero-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  overflow: hidden;
}
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-index {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  background: var(--bg);
  padding: 4px 8px;
}

.hero-body { display: flex; flex-direction: column; gap: 18px; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(38px, 9vw, 92px);
  line-height: 0.94;
  letter-spacing: -0.03em;
}
.hero-desc { margin: 0; font-size: clamp(15px, 2.2vw, 19px); max-width: 46ch; color: var(--ink-soft); }
.hero-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* =============================================================
   HOME — GENERIC BLOCKS
   ============================================================= */
.block { padding: clamp(40px, 8vw, 90px) 0; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block-head { margin-bottom: 24px; }
.block-title {
  margin: 6px 0 0;
  font-weight: 800;
  font-size: clamp(26px, 5vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* YouTube placeholder */
.yt-empty {
  margin-top: 8px;
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* Subscribe */
.subscribe-inner {
  display: grid;
  gap: 24px;
}
.subscribe-copy .block-title { margin-top: 8px; }
.subscribe-copy .muted { margin: 10px 0 0; }
.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.subscribe-form input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 13px 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--bg);
  color: var(--ink);
}
.subscribe-form input::placeholder { color: var(--ink-soft); }
.subscribe-status {
  flex-basis: 100%;
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  min-height: 1em;
}

/* =============================================================
   SHOP — GRID
   ============================================================= */
.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 44px) clamp(16px, 3vw, 28px);
}
.pack-card { display: flex; flex-direction: column; gap: 12px; }
.pack-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  overflow: hidden;
}
.pack-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.pack-card:hover .pack-cover img { transform: scale(1.03); }
.pack-index {
  position: absolute;
  top: 10px; left: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  background: var(--bg);
  padding: 3px 7px;
}
.pack-cover .play-btn {
  position: absolute;
  bottom: 10px; right: 10px;
}
.pack-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.pack-title {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.pack-price {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
}
.pack-buy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  white-space: nowrap;
}
.pack-buy:hover { color: var(--accent); border-color: var(--accent); }

/* =============================================================
   ABOUT / CONTACT — PROSE
   ============================================================= */
.prose { max-width: 56ch; display: flex; flex-direction: column; gap: 16px; }
.prose p { margin: 0; font-size: clamp(16px, 2.4vw, 22px); line-height: 1.5; }
.contact-links { display: flex; gap: 20px; font-family: var(--font-mono); font-size: 14px; }
.contact-links a { border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.contact-links a:hover { color: var(--accent); border-color: var(--accent); }

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer {
  border-top: 1px solid var(--line-strong);
  margin-top: clamp(20px, 5vw, 40px);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 36px;
}
.footer-brand { font-weight: 800; font-size: 16px; }
.footer-social {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-social a { opacity: 0.85; }
.footer-social a:hover { opacity: 1; color: var(--accent); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* =============================================================
   MOBILE NAV DRAWER (small screens)
   ============================================================= */
@media (max-width: 719px) {
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 360ms var(--ease), opacity 260ms var(--ease);
    z-index: 40;
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 14px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a.is-active::after { display: none; }
}

/* =============================================================
   RESPONSIVE BREAKPOINTS (progressive enhancement up)
   ============================================================= */
@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .header-clock { display: block; }
  .hero { grid-template-columns: 1.05fr 1fr; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .subscribe-inner { grid-template-columns: 1fr 1fr; align-items: center; }
}

@media (min-width: 1040px) {
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { grid-template-columns: 1fr 1fr; gap: 56px; }
}

@media (min-width: 1360px) {
  .shop-grid { grid-template-columns: repeat(4, 1fr); }
}
