/*
Theme Name: Sacred Geometry Devices
Template: twentytwentyfive
Description: Frequency Atlas-matched storefront theme for devices.sacredgeometry.io
Version: 1.0
*/

/* ============ DESIGN TOKENS (matched from the Frequency Atlas landing page) ============ */
:root {
  --sg-bg: #0a0d14;
  --sg-bg-deep: #06080c;
  --sg-surface: #131820;
  --sg-surface-2: #1a2029;
  --sg-border: #1f2832;
  --sg-border-bright: #2a3441;
  --sg-amber: #ffb94a;
  --sg-amber-glow: rgba(255, 185, 74, 0.2);
  --sg-cyan: #4adeff;
  --sg-cyan-glow: rgba(74, 222, 255, 0.2);
  --sg-cream: #f4e8d8;
  --sg-muted: #6b7785;
  --sg-muted-2: #4a5563;
  --sg-danger: #ff5c5c;
  --sg-success: #6be89b;
  --sg-display: "Major Mono Display", monospace;
  --sg-mono: "JetBrains Mono", monospace;
  --sg-serif: "Cinzel", "Times New Roman", serif;
  --sg-body: "Manrope", system-ui, sans-serif;
}

/* ============ BASE ============ */
html, body {
  background: var(--sg-bg) !important;
  color: var(--sg-cream) !important;
  font-family: var(--sg-body) !important;
}

body {
  background-image:
    radial-gradient(circle at 15% 20%, var(--sg-surface) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, #0f1620 0%, transparent 50%),
    linear-gradient(180deg, var(--sg-bg) 0%, var(--sg-bg-deep) 100%) !important;
  background-attachment: fixed !important;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 185, 74, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 185, 74, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
}

#page, .wp-site-blocks, main, .site-main { position: relative; z-index: 1; }

a { color: var(--sg-amber); }
a:hover { color: var(--sg-cyan); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sg-serif) !important;
  letter-spacing: 0.04em;
  color: var(--sg-cream) !important;
  font-weight: 500 !important;
}

.sg-eyebrow, .wc-block-components-product-badge, label, .form-row label {
  font-family: var(--sg-mono) !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  color: var(--sg-muted) !important;
}

/* ============ HEADER / NAV ============ */
header.wp-block-template-part, .site-header, header#masthead {
  background: rgba(10, 13, 20, 0.85) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sg-border) !important;
}

.site-title, .wp-block-site-title a {
  font-family: var(--sg-serif) !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  color: var(--sg-cream) !important;
  font-size: 1.1rem !important;
}

.wp-block-navigation a, nav a, .site-nav a {
  font-family: var(--sg-mono) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
  color: var(--sg-muted) !important;
}
.wp-block-navigation a:hover { color: var(--sg-amber) !important; }

/* Brand mark: pulsing amber dot, matches Frequency Atlas */
.sg-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 1.5px solid var(--sg-amber);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}
.sg-brand-mark::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--sg-amber);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--sg-amber);
  animation: sg-pulse 2s ease-in-out infinite;
}
@keyframes sg-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

/* ============ BUTTONS / CTAs ============ */
.wp-block-button__link,
.button, button, input[type="submit"],
.single_add_to_cart_button,
.wc-block-components-button {
  background: transparent !important;
  border: 1px solid var(--sg-amber) !important;
  color: var(--sg-amber) !important;
  font-family: var(--sg-mono) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  border-radius: 3px !important;
  padding: 0.85rem 1.6rem !important;
  box-shadow: 0 0 14px var(--sg-amber-glow);
  transition: all 0.15s;
}
.wp-block-button__link:hover,
.button:hover, button:hover, input[type="submit"]:hover,
.single_add_to_cart_button:hover,
.wc-block-components-button:hover {
  background: var(--sg-amber) !important;
  color: var(--sg-bg) !important;
  box-shadow: 0 0 26px var(--sg-amber-glow);
}

/* ============ PRODUCT CARDS / SHOP GRID ============ */
ul.products li.product,
.wc-block-grid__product,
.wp-block-woocommerce-product-template li {
  background: var(--sg-surface) !important;
  border: 1px solid var(--sg-border) !important;
  border-radius: 4px !important;
  padding: 1rem !important;
  transition: border-color 0.2s;
}
ul.products li.product:hover,
.wc-block-grid__product:hover {
  border-color: var(--sg-border-bright) !important;
}

.woocommerce ul.products li.product .price,
.wc-block-grid__product-price,
.price {
  font-family: var(--sg-mono) !important;
  color: var(--sg-amber) !important;
  font-size: 1rem !important;
}
.price del { color: var(--sg-muted) !important; opacity: 0.6; }
.price ins { text-decoration: none; }

.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--sg-serif) !important;
  font-size: 1.05rem !important;
  color: var(--sg-cream) !important;
}

.onsale, .wc-block-components-product-badge {
  background: var(--sg-cyan) !important;
  color: var(--sg-bg-deep) !important;
  font-family: var(--sg-mono) !important;
  letter-spacing: 0.1em;
  border-radius: 3px !important;
  box-shadow: 0 0 12px var(--sg-cyan-glow);
}

/* ============ SINGLE PRODUCT PAGE ============ */
.woocommerce div.product .product_title,
.wp-block-post-title {
  font-family: var(--sg-serif) !important;
  color: var(--sg-cream) !important;
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  font-family: var(--sg-mono) !important;
  color: var(--sg-amber) !important;
  font-size: 1.6rem !important;
}
.woocommerce div.product .woocommerce-product-details__short-description {
  font-family: var(--sg-body) !important;
  color: var(--sg-muted) !important;
  line-height: 1.7;
}

/* Spec / frequency-range callout box (technical instrument feel) */
.sg-spec-box {
  background: var(--sg-surface) !important;
  border: 1px solid var(--sg-border) !important;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.sg-spec-box .sg-spec-title {
  font-family: var(--sg-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sg-cyan);
  margin-bottom: 0.75rem;
  display: block;
}
.sg-spec-box dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 0; }
.sg-spec-box dt { font-family: var(--sg-mono); font-size: 0.75rem; color: var(--sg-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.sg-spec-box dd { font-family: var(--sg-mono); font-size: 0.85rem; color: var(--sg-cream); margin: 0; }

/* Trust badge row */
.sg-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.sg-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--sg-surface-2);
  border: 1px solid var(--sg-border);
  border-radius: 3px;
  padding: 0.5rem 0.9rem;
  font-family: var(--sg-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sg-muted);
}
.sg-trust-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sg-success);
  box-shadow: 0 0 8px var(--sg-success);
}

/* FAQ accordion */
.sg-faq { border-top: 1px solid var(--sg-border); margin-top: 2rem; }
.sg-faq details {
  border-bottom: 1px solid var(--sg-border);
  padding: 1rem 0;
}
.sg-faq summary {
  font-family: var(--sg-serif);
  color: var(--sg-cream);
  cursor: pointer;
  font-size: 1rem;
}
.sg-faq summary::marker { color: var(--sg-amber); }
.sg-faq p { color: var(--sg-muted); margin-top: 0.75rem; line-height: 1.6; }

/* ============ CART / CHECKOUT ============ */
.woocommerce-cart table.cart, .woocommerce-checkout table,
.wc-block-cart, .wc-block-checkout {
  background: var(--sg-surface) !important;
  border: 1px solid var(--sg-border) !important;
}
.woocommerce table.shop_table th {
  font-family: var(--sg-mono) !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sg-muted) !important;
  border-bottom: 1px solid var(--sg-border) !important;
}
input, select, textarea,
.wc-block-components-text-input input {
  background: var(--sg-surface-2) !important;
  border: 1px solid var(--sg-border) !important;
  color: var(--sg-cream) !important;
  border-radius: 3px !important;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--sg-amber) !important;
  outline: none;
}

/* Remove the theme's "Designed with WordPress" credit line */
p.wp-block-paragraph:has(a[href="https://wordpress.org"]) {
  display: none !important;
}

/* ============ FOOTER ============ */
footer.wp-block-template-part, .site-footer, footer#colophon {
  background: var(--sg-bg-deep) !important;
  border-top: 1px solid var(--sg-border) !important;
  color: var(--sg-muted) !important;
}
.site-footer a { color: var(--sg-muted) !important; }
.site-footer a:hover { color: var(--sg-amber) !important; }
