@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ---------- Base (shared dark HUD surface) ---------- */
:root {
  --bg: #090D14;
  --surface: #10151F;
  --surface-2: #161C29;
  --ink: #E8EEF5;
  --ink-soft: #7C8CA0;
  --line: rgba(140, 160, 185, 0.25);
}

/* ---------- Per-season accent pairs ---------- */
[data-season="spring"] { --accent: #39FF9E; --accent-2: #FF5FA8; }
[data-season="summer"] { --accent: #00E1FF; --accent-2: #FFC300; }
[data-season="autumn"] { --accent: #FF7A29; --accent-2: #FF3860; }
[data-season="winter"] { --accent: #3FA9FF; --accent-2: #B98CFF; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  position: relative;
}

/* faint CRT scanline overlay, purely decorative */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 3px
  );
}

h1, h2, h3 {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  margin: 0 0 0.4em 0;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.mono {
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.04em;
}

a { color: var(--accent); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */
header.site-header {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

header.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 55%, var(--accent-2));
  opacity: 0.8;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
  flex-wrap: wrap;
}

.brand-group { display: flex; align-items: center; gap: 14px; }

.brand {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  padding: 4px 10px 4px 8px;
  background: var(--surface-2);
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px 1px var(--accent);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

nav.site-nav {
  display: flex;
  gap: 8px;
}

nav.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

nav.site-nav a:hover { color: var(--ink); border-color: var(--accent); }

nav.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px -2px var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 60px;
  position: relative;
  background:
    radial-gradient(ellipse 60% 70% at 78% 45%, color-mix(in srgb, var(--accent) 10%, transparent), transparent),
    repeating-linear-gradient(0deg, var(--line) 0, var(--line) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(90deg, var(--line) 0, var(--line) 1px, transparent 1px, transparent 64px);
  background-blend-mode: normal;
  opacity: 1;
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.1;
}

.hero .tagline {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.hero .tagline::before { content: "// "; color: var(--ink-soft); }

.hero p.description {
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.hero .cta-row {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  text-decoration: none;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--accent);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn.primary {
  background: var(--accent);
  color: var(--bg);
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }

.hero-art {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art svg { width: 100%; height: 100%; }

.hud-ring-rotate {
  animation: spin 50s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- Section heading ---------- */
.section-head {
  margin-bottom: 28px;
}

.section-head h2 { font-size: 1.6rem; }

/* ---------- HUD panel (shared card frame) ---------- */
.hud-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  padding: 26px 24px;
}

.hud-panel::before,
.hud-panel::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.hud-panel::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.hud-panel::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

/* ---------- Gallery ---------- */
/* Gallery Layout */
.product-gallery {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-container {
  display: grid;
  /* Automatically adjusts column count based on screen width (minimum 280px per item) */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Gallery Item Container */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  aspect-ratio: 1 / 1; /* Keeps images perfectly square. Change to 3 / 4 for portrait rows */
  background-color: #f9f9f9;
}

/* Image Styles */
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Hover Overlay Effect */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}

/* Typography & Button inside Overlay */
.product-title {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 5px;
}

.product-price {
  color: #e0e0e0;
  font-size: 1rem;
  margin-bottom: 15px;
}

.view-btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: #fff;
  color: #333;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.view-btn:hover {
  background-color: #333;
  color: #fff;
}

/* Interactive Hover States */
.gallery-item:hover .gallery-overlay {
  opacity: 1; /* Reveals the text overlay */
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05); /* Subtle zoom effect on the image */
}

/* ==========================================================================
   DYNAMIC RECONFIGURABLE VARIABLES (Updated via config.json)
   ========================================================================== */
:root {
  --gallery-accent: #ffb7c5;       /* Default Fallback (Spring Blossom Pink) */
  --gallery-text: #ffffff;
  --gallery-overlay-bg: rgba(20, 20, 20, 0.85);
  --gallery-btn-bg: var(--gallery-accent);
  --gallery-btn-text: #ffffff;
}

/* ==========================================================================
   GALLERY ARCHITECTURE & BADGES
   ========================================================================== */
.product-gallery {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-header {
  text-align: center;
  margin-bottom: 50px;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1 / 1;
  background-color: #1a1a1a;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Badge Positioning Frame */
.item-badges {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none; /* Allows hover triggers to pass straight through */
}

/* Universal Badge Styling */
.badge {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Specific Badge Modifiers hooked into Theme Accent colors */
.badge-stock { background-color: #10b981; } /* Crisp Green */
.badge-type { background-color: #3b82f6; }  /* Royal Blue */
.badge-limited { background-color: var(--gallery-accent); } /* Linked directly to dynamic seasonal accent! */

/* Interactive Hover Popover Overlays */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gallery-overlay-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  padding: 30px;
  box-sizing: border-box;
  text-align: center;
  transition: opacity 0.4s ease;
  z-index: 5;
}

.product-title {
  color: var(--gallery-text);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.product-tag {
  color: var(--gallery-accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 8px 0;
}

.product-price {
  color: var(--gallery-text);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 20px;
  opacity: 0.9;
}

.view-btn {
  display: inline-block;
  padding: 10px 22px;
  background-color: var(--gallery-btn-bg);
  color: var(--gallery-btn-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--gallery-accent);
  transition: transform 0.2s ease;
}

.view-btn:hover {
  transform: translateY(-2px);
}

/* Hover Reveals */
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-img { transform: scale(1.06); }


/* ---------- Service cards ---------- */
.services { padding: 8px 0 64px; }

.card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; }

.service-card .price {
  font-family: 'Share Tech Mono', monospace;
  font-weight: 400;
  color: var(--accent);
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.service-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0;
}

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 36px 0 30px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

footer .contact-block div { margin-bottom: 4px; }
footer .contact-block strong { color: var(--ink); font-family: 'Chakra Petch', sans-serif; }

/* ---------- Pricing page ---------- */
.pricing-section { padding: 56px 0 72px; }

.plan-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.plan-card {
  display: flex;
  flex-direction: column;
}

.plan-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 24px -8px var(--accent);
}

.plan-card .plan-name {
  font-family: 'Share Tech Mono', monospace;
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.plan-card .plan-price {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 2.1rem;
  color: var(--ink);
  margin-bottom: 2px;
}

.plan-card .plan-period {
  font-family: 'Share Tech Mono', monospace;
  color: var(--ink-soft);
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.plan-card .plan-details {
  color: var(--ink-soft);
  font-size: 0.98rem;
  flex-grow: 1;
}

.plan-card .badge {
  align-self: flex-start;
  background: var(--accent);
  color: var(--bg);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  padding: 3px 10px;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

/* ---------- Calendar page ---------- */
.calendar-section { padding: 56px 0 72px; }

.month-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.month-card h3 {
  font-size: 1.1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
  color: var(--accent);
}

.month-card ul { margin: 0; padding: 0; list-style: none; }

.month-card li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.month-card li::before { content: "› "; color: var(--accent); }
.month-card li:last-child { border-bottom: none; }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 260px; margin: 0 auto; }
  .card-row, .plan-row, .month-row { grid-template-columns: 1fr; }
  nav.site-nav { gap: 6px; flex-wrap: wrap; }
  footer .wrap { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status-pill .dot { animation: none; }
  .hud-ring-rotate { animation: none; }
}

/* ---------- Focus visibility ---------- */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
