/* ============================================================================
   TESSA DRAWS — CATEDRAL NEBULOSA (01A)
   Production Stylesheet (HTML5 / CSS3 Vanilla)
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. DESIGN TOKENS (01A: CATEDRAL NEBULOSA)
   ---------------------------------------------------------------------------- */
:root {
  --bg-void: #060714;
  --bg-panel: rgba(16, 15, 36, 0.84);
  --bg-panel-deep: rgba(8, 9, 24, 0.94);
  --purple: #9d6bff;
  --blue: #3b82f6;
  --cyan: #56ccf2;
  --gold: #e6cf9b;
  --gold-soft: rgba(230, 207, 155, 0.3);
  --ink: #f6f3ff;
  --muted: #b8bedb;
  --line: rgba(230, 207, 155, 0.28);
  --line-cosmic: rgba(86, 204, 242, 0.35);
  --glow-primary: rgba(157, 107, 255, 0.38);
  --glow-secondary: rgba(59, 130, 246, 0.35);
  --shadow: 0 26px 76px rgba(0, 0, 0, 0.72);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-void);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
.art-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ----------------------------------------------------------------------------
   2. COSMIC BACKDROP LAYERS (NEBULA + CATHEDRAL VEIL + CANVAS)
   ---------------------------------------------------------------------------- */
.nebula-backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 68% 48% at 50% 8%, rgba(157, 107, 255, 0.28), transparent 64%),
    radial-gradient(ellipse 56% 44% at 86% 24%, rgba(59, 130, 246, 0.28), transparent 60%),
    radial-gradient(ellipse 52% 46% at 14% 52%, rgba(86, 204, 242, 0.2), transparent 60%),
    radial-gradient(ellipse 60% 45% at 78% 82%, rgba(139, 92, 246, 0.24), transparent 62%),
    radial-gradient(ellipse 46% 36% at 22% 88%, rgba(37, 99, 235, 0.22), transparent 60%),
    var(--bg-void);
}

.cathedral-veil {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: linear-gradient(
    90deg,
    transparent 0,
    transparent calc(100% - 1px),
    rgba(230, 207, 155, 0.04) 100%
  );
  background-size: 210px 100%;
}

#cosmosCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: block;
}

/* ----------------------------------------------------------------------------
   3. KEYFRAME ANIMATIONS
   ---------------------------------------------------------------------------- */
@keyframes spinCW {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes twinklePulse {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.22); }
}

@keyframes coronaBreathe {
  0%, 100% {
    filter:
      drop-shadow(0 0 26px rgba(157, 107, 255, 0.55))
      drop-shadow(0 0 44px rgba(59, 130, 246, 0.35));
  }
  50% {
    filter:
      drop-shadow(0 0 38px rgba(86, 204, 242, 0.72))
      drop-shadow(0 0 60px rgba(230, 207, 155, 0.42));
  }
}

@keyframes textShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes sweepGleam {
  0% { transform: translateX(-140%) skewX(-24deg); }
  100% { transform: translateX(260%) skewX(-24deg); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

/* ----------------------------------------------------------------------------
   4. STICKY NAVIGATION HEADER
   ---------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(6, 8, 22, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.site-header::after {
  content: "";
  display: block;
  height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--blue),
    var(--purple),
    var(--gold),
    var(--cyan),
    transparent
  );
  opacity: 0.75;
}

.nav-wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 13px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.nav-side {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-side.right {
  justify-content: flex-end;
}

.nav-side a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-side a:hover {
  color: #ffffff;
  text-shadow: 0 0 14px var(--cyan);
}

.brand-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 18px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 18px;
  letter-spacing: 0.15em;
  color: var(--ink);
  text-shadow: 0 0 18px var(--glow-primary);
}

.brand-link span {
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-link small {
  font-family: 'DM Sans', sans-serif;
  font-size: 8.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-top: 2px;
}

/* Buttons */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(22, 22, 54, 0.88), rgba(9, 11, 28, 0.94));
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: translateX(-160%) skewX(-24deg);
  pointer-events: none;
}

.btn:hover::after {
  animation: sweepGleam 0.85s ease forwards;
}

.btn:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 28px var(--glow-secondary), 0 0 12px rgba(230, 207, 155, 0.28);
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.btn.primary {
  background: linear-gradient(125deg, #5e3fb5 0%, #3b5bdb 52%, #1e3a8a 100%);
  border-color: var(--gold);
  color: #ffffff;
  box-shadow: 0 0 28px var(--glow-primary), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn.primary::after {
  animation: sweepGleam 4.2s ease-in-out infinite;
}

.nav-cta {
  padding: 9px 15px;
  font-size: 10.5px;
}

.btn-full {
  width: 100%;
  margin-top: 26px;
}

.btn-compact {
  padding: 6px 12px;
  font-size: 10px;
}

.menu-toggle {
  display: none;
  background: rgba(18, 22, 50, 0.8);
  border: 1px solid var(--line);
  color: var(--gold);
  padding: 8px 13px;
  border-radius: 4px;
  font-size: 16px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 14px;
  padding: 18px 24px 24px;
  background: rgba(6, 8, 22, 0.98);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mobile-nav.show {
  display: flex;
}

.mobile-cta {
  margin-top: 6px;
}

/* ----------------------------------------------------------------------------
   5. MAIN CONTAINER & HERO
   ---------------------------------------------------------------------------- */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.hero {
  position: relative;
  text-align: center;
  padding: 52px 0 92px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(230, 207, 155, 0.4);
}

.hero-crest-stage {
  position: relative;
  width: min(460px, 92vw);
  margin: 22px auto 8px;
  display: grid;
  place-items: center;
}

.hero-art-svg {
  width: 100%;
  height: auto;
  overflow: visible;
  animation: coronaBreathe 6.5s ease-in-out infinite;
}

.orbit-cw {
  transform-origin: center;
  transform-box: fill-box;
  animation: spinCW 44s linear infinite;
}

.orbit-ccw {
  transform-origin: center;
  transform-box: fill-box;
  animation: spinCCW 32s linear infinite;
}

.sparkle-pulse {
  transform-origin: center;
  transform-box: fill-box;
  animation: twinklePulse 2.8s ease-in-out infinite;
}

.sparkle-pulse.d2 {
  animation-delay: 0.9s;
}

.sparkle-pulse.d3 {
  animation-delay: 1.7s;
}

.hero h1 {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-weight: 400;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.12;
  margin: 14px auto 18px;
  max-width: 860px;
  letter-spacing: 0.01em;
  text-shadow: 0 6px 32px rgba(0, 0, 0, 0.65);
}

.hero h1 em {
  font-style: normal;
  display: block;
  background: linear-gradient(90deg, #ffffff 0%, var(--cyan) 32%, var(--purple) 68%, var(--gold) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textShimmer 7s ease-in-out infinite;
}

.hero-copy {
  max-width: 600px;
  margin: 0 auto;
  color: var(--muted);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(19px, 2.3vw, 24px);
  line-height: 1.52;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(12, 16, 38, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.14);
}

/* ----------------------------------------------------------------------------
   6. SECTIONS & SACRED DIVIDERS
   ---------------------------------------------------------------------------- */
section.content-sec {
  padding: 80px 0;
  position: relative;
}

.sacred-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 auto 44px;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.32em;
  text-shadow: 0 0 14px var(--cyan);
}

.sacred-divider::before,
.sacred-divider::after {
  content: "";
  flex: 1;
  max-width: 280px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--gold), transparent);
}

.section-head {
  text-align: center;
  max-width: 690px;
  margin: 0 auto 46px;
}

.section-head h2 {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-weight: 400;
  font-size: clamp(28px, 4.1vw, 46px);
  margin: 10px 0 14px;
  line-height: 1.18;
  text-shadow: 0 0 26px var(--glow-primary);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ----------------------------------------------------------------------------
   7. 01 / COMMISSIONS — POINTED ARCH CARDS (01A)
   ---------------------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  padding: 54px 26px 32px;
  overflow: hidden;
  background: linear-gradient(175deg, rgba(26, 23, 56, 0.9), rgba(9, 11, 28, 0.96));
  border: 1px solid rgba(230, 207, 155, 0.34);
  border-radius: 155px 155px 8px 8px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55), inset 0 1px 22px rgba(59, 130, 246, 0.16);
  transition: transform 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(86, 204, 242, 0.28);
  border-radius: 146px 146px 4px 4px;
  pointer-events: none;
  transition: border-color 0.3s ease;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 55%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.14),
    rgba(86, 204, 242, 0.18),
    transparent
  );
  transform: translateX(-160%) skewX(-24deg);
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-7px);
  border-color: var(--gold);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.68),
    0 0 38px rgba(157, 107, 255, 0.34),
    0 0 22px rgba(59, 130, 246, 0.32);
}

.service-card:hover::before {
  border-color: rgba(86, 204, 242, 0.68);
}

.service-card:hover::after {
  animation: sweepGleam 0.9s ease forwards;
}

.service-glyph {
  font-size: 25px;
  color: var(--gold);
  text-shadow: 0 0 18px var(--cyan), 0 0 28px var(--purple);
  margin-bottom: 12px;
  animation: floatSlow 4.5s ease-in-out infinite;
}

.service-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink);
}

.service-card p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 24px;
}

.service-price {
  font-family: 'Cinzel', serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--gold);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-shadow: 0 0 16px rgba(230, 207, 155, 0.32);
}

/* ----------------------------------------------------------------------------
   8. 02 / GALLERY — COSMIC STAINED-GLASS WINDOWS + REAL IMAGES
   ---------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.art-card {
  cursor: pointer;
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 128px 128px 8px 8px;
  padding: 12px 12px 0;
  transition: transform 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease;
  overflow: hidden;
}

.art-card:hover,
.art-card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--cyan);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.72), 0 0 36px var(--glow-secondary);
}

.art-window {
  position: relative;
  height: 295px;
  overflow: hidden;
  border: 1px solid rgba(230, 207, 155, 0.32);
  border-radius: 116px 116px 4px 4px;
  display: grid;
  place-items: center;
}

/* Unique nebula fallback gradients per window */
.art-window.w1,
.modal-fallback.w1 {
  background: radial-gradient(circle at 38% 32%, #a882ff, #364fc7 45%, #121536 74%, #060714 96%);
}

.art-window.w2,
.modal-fallback.w2 {
  background: radial-gradient(circle at 58% 30%, #d977cc, #5b21b6 44%, #1d2661 74%, #080716 96%);
}

.art-window.w3,
.modal-fallback.w3 {
  background: radial-gradient(circle at 46% 30%, #56ccf2, #2563eb 44%, #171c4a 74%, #050918 96%);
}

.art-window.w4,
.modal-fallback.w4 {
  background: radial-gradient(circle at 50% 34%, #f3d695, #6d46a8 46%, #1b2252 76%, #090816 96%);
}

.art-window.w5,
.modal-fallback.w5 {
  background: radial-gradient(circle at 44% 34%, #5eead4, #2563eb 46%, #1e1b4b 76%, #050d18 96%);
}

.art-window.w6,
.modal-fallback.w6 {
  background: radial-gradient(circle at 52% 30%, #c084fc, #4338ca 46%, #151b46 76%, #070716 96%);
}

/* Inner starlight specks (visible over fallback gradients) */
.art-window::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    radial-gradient(1.5px 1.5px at 22% 24%, #ffffff 99%, transparent),
    radial-gradient(2px 2px at 74% 18%, #f3dfa2 99%, transparent),
    radial-gradient(1.5px 1.5px at 66% 62%, #7dd3fc 99%, transparent),
    radial-gradient(1px 1px at 30% 76%, #ffffff 99%, transparent),
    radial-gradient(2px 2px at 82% 78%, #e9d5ff 99%, transparent);
  opacity: 0.85;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.art-window.has-image::before {
  opacity: 0;
}

/* Diagonal gleam on hover */
.art-window::after {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: 4;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.24) 47%,
    rgba(56, 189, 248, 0.3) 53%,
    rgba(192, 132, 252, 0.22) 59%,
    transparent 70%
  );
  transform: translateX(-110%);
  transition: transform 0.75s ease;
  pointer-events: none;
}

.art-card:hover .art-window::after {
  transform: translateX(110%);
}

/* Real artwork image layer */
.art-img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.5s ease;
}

.art-window.has-image .art-img {
  opacity: 1;
}

.art-window.is-fallback .art-img {
  display: none;
}

.art-card:hover .art-window.has-image .art-img {
  transform: scale(1.045);
}

/* Gothic lancet SVG overlay (full fallback while loading, delicate arch border once image loads) */
.art-overlay-svg {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: transform 0.45s ease, opacity 0.35s ease;
}

.art-card:hover .art-overlay-svg {
  transform: scale(1.04);
}

.art-fallback-motif {
  transition: opacity 0.35s ease;
}

.art-window.has-image .art-fallback-motif {
  opacity: 0;
}

.art-window.has-image .art-overlay-svg {
  opacity: 0.42;
}

.art-meta {
  padding: 16px 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.art-meta strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

.art-meta span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ----------------------------------------------------------------------------
   9. 03 / CALCULATOR & 05 / REQUEST — ALTAR PANELS
   ---------------------------------------------------------------------------- */
.altar-panel {
  position: relative;
  background: linear-gradient(155deg, var(--bg-panel), var(--bg-panel-deep));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  padding: 32px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.altar-panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(86, 204, 242, 0.16);
  border-radius: inherit;
  pointer-events: none;
}

.corner-star {
  position: absolute;
  color: var(--gold);
  font-size: 11px;
  text-shadow: 0 0 10px var(--cyan);
  pointer-events: none;
}

.corner-star.tl { top: 5px; left: 7px; }
.corner-star.tr { top: 5px; right: 7px; }
.corner-star.bl { bottom: 5px; left: 7px; }
.corner-star.br { bottom: 5px; right: 7px; }

.calc-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
}

.field {
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.field label,
.field-legend {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.field select,
.field input,
.field textarea {
  width: 100%;
  background: rgba(5, 7, 19, 0.88);
  border: 1px solid rgba(157, 107, 255, 0.34);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field select:focus,
.field input:focus,
.field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.checkrow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 13.5px;
  margin: 10px 0;
  cursor: pointer;
}

.field label.checkrow {
  display: flex;
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--muted);
  margin-bottom: 10px;
}

.checkrow input {
  width: auto;
  margin-top: 3px;
  accent-color: var(--cyan);
}

.small-note {
  font-size: 12px;
  color: var(--muted);
}

.estimate-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.estimate-col h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 27px;
  margin: 6px 0 0;
}

.total-display {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 56px;
  line-height: 1.08;
  margin: 14px 0 4px;
  background: linear-gradient(90deg, #ffffff, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(86, 204, 242, 0.32));
}

.breakdown {
  border-top: 1px dashed var(--line-cosmic);
  margin-top: 20px;
  padding-top: 14px;
  font-size: 13.5px;
  color: var(--muted);
}

.breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
}

.breakdown strong {
  color: var(--ink);
}

/* ----------------------------------------------------------------------------
   10. 04 / TERMS OF SERVICE — ACCORDIONS
   ---------------------------------------------------------------------------- */
.tos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.accordion {
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.accordion.open {
  border-color: var(--cyan);
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.16);
}

.accordion button {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
}

.accordion button span {
  color: var(--cyan);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  transition: transform 0.25s ease;
}

.accordion.open button span {
  transform: rotate(45deg);
}

.accordion .content {
  display: none;
  padding: 14px 22px 20px;
  border-top: 1px solid rgba(86, 204, 242, 0.16);
  color: var(--muted);
  font-size: 13.5px;
}

.accordion.open .content {
  display: block;
}

/* ----------------------------------------------------------------------------
   11. 05 / COMMISSION REQUEST FORM & SYNCED ESTIMATE BANNER
   ---------------------------------------------------------------------------- */
.request-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 24px;
}

.request-intro h3 {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 24px;
  margin: 12px 0 14px;
  line-height: 1.3;
}

.request-intro p {
  color: var(--muted);
  font-size: 14px;
}

.request-intro .intro-highlights {
  margin-top: 20px;
  color: var(--gold);
}

.form-estimate-banner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 20px;
  padding: 12px 15px;
  background: rgba(8, 11, 28, 0.85);
  border: 1px solid var(--line-cosmic);
  border-radius: 5px;
  font-size: 12.5px;
  color: var(--muted);
}

.form-estimate-banner strong {
  color: var(--gold);
  font-weight: 600;
}

.form-estimate-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.estimate-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(230, 207, 155, 0.28);
  background: rgba(157, 107, 255, 0.14);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.estimate-pill.accent {
  border-color: rgba(86, 204, 242, 0.45);
  background: rgba(59, 130, 246, 0.18);
  color: var(--cyan);
}

.estimate-edit-link {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  white-space: nowrap;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.estimate-edit-link:hover {
  color: #ffffff;
  text-shadow: 0 0 10px var(--cyan);
}

.form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.form-fields .wide {
  grid-column: 1 / -1;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  margin-top: 14px;
  font-size: 13px;
  color: var(--cyan);
  min-height: 20px;
}

.copy-box {
  display: none;
  margin-top: 14px;
  padding: 14px;
  background: rgba(5, 7, 19, 0.9);
  border: 1px solid var(--line-cosmic);
  border-radius: 6px;
}

.copy-box.show {
  display: block;
}

.copy-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.copy-box textarea {
  width: 100%;
  min-height: 158px;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
  outline: none;
}

/* ----------------------------------------------------------------------------
   12. 06 / LINKS & FOOTER
   ---------------------------------------------------------------------------- */
.links-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.social-btn {
  padding: 14px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.social-btn:hover {
  border-color: var(--cyan);
  color: #ffffff;
  box-shadow: 0 0 26px var(--glow-secondary);
  transform: translateY(-2px);
}

footer {
  border-top: 1px solid var(--line);
  padding: 36px 24px 44px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}

/* ----------------------------------------------------------------------------
   13. GALLERY MODAL LIGHTBOX & TOAST NOTIFICATION
   ---------------------------------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(3, 5, 14, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  place-items: center;
  padding: 20px;
}

.modal.show {
  display: grid;
}

.modal[hidden] {
  display: none;
}

.modal-box {
  max-width: 640px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(22, 22, 54, 0.96), rgba(7, 9, 24, 0.98));
  border: 1px solid var(--gold);
  border-radius: 116px 116px 12px 12px;
  padding: 26px 28px 30px;
  text-align: center;
  box-shadow: var(--shadow), 0 0 42px var(--glow-primary);
}

.modal-media {
  position: relative;
  width: 100%;
  min-height: 260px;
  max-height: 54vh;
  margin: 0 auto 22px;
  overflow: hidden;
  border-radius: 96px 96px 6px 6px;
  border: 1px solid rgba(230, 207, 155, 0.34);
  background: rgba(6, 7, 20, 0.92);
  display: grid;
  place-items: center;
}

.modal-img {
  display: none;
  width: 100%;
  max-height: 54vh;
  object-fit: contain;
  background: rgba(6, 7, 20, 0.95);
}

.modal-media.has-image .modal-img {
  display: block;
}

.modal-fallback {
  position: relative;
  width: 100%;
  height: 310px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.modal-media.has-image .modal-fallback {
  display: none;
}

.modal-fallback svg {
  width: 100%;
  height: 100%;
  max-width: 260px;
  pointer-events: none;
}

.modal-box h3 {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 26px;
  margin: 10px 0 10px;
}

.modal-box p {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 520px;
  margin: 0 auto 24px;
}

#siteToast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 3000;
  max-width: 360px;
  background: rgba(9, 13, 32, 0.96);
  color: var(--ink);
  border: 1px solid var(--cyan);
  border-radius: 10px;
  padding: 13px 17px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.7), 0 0 22px rgba(56, 189, 248, 0.25);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#siteToast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------------------------------------------------------
   14. RESPONSIVE DESIGN (TABLET & MOBILE)
   ---------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .nav-wrap {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .nav-side {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .brand-link {
    border: 0;
    padding: 0;
    align-items: flex-start;
  }

  .cards-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc-grid,
  .request-grid,
  .tos-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  main {
    padding: 0 16px;
  }

  .hero {
    padding: 38px 0 68px;
  }

  .cards-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .form-fields {
    grid-template-columns: 1fr;
  }

  .form-fields .wide {
    grid-column: auto;
  }

  .altar-panel {
    padding: 22px 18px;
  }

  .art-window {
    height: 245px;
  }

  section.content-sec {
    padding: 62px 0;
  }

  .modal-box {
    border-radius: 72px 72px 10px 10px;
    padding: 20px 18px 24px;
  }

  .modal-media {
    border-radius: 58px 58px 6px 6px;
    min-height: 210px;
  }

  .modal-fallback {
    height: 240px;
  }
}

/* ----------------------------------------------------------------------------
   15. ACCESSIBILITY — REDUCED MOTION
   ---------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-art-svg,
  .orbit-cw,
  .orbit-ccw,
  .sparkle-pulse,
  .hero h1 em,
  .service-glyph,
  .btn::after,
  .btn.primary::after,
  .btn:hover::after,
  .service-card::after,
  .service-card:hover::after {
    animation: none !important;
  }

  .btn,
  .service-card,
  .art-card,
  .art-img,
  .art-overlay-svg,
  .art-window::after,
  .social-btn,
  .accordion,
  .accordion button span,
  #siteToast {
    transition-duration: 0.01ms !important;
  }

  .btn:hover,
  .service-card:hover,
  .art-card:hover,
  .art-card:focus-visible,
  .social-btn:hover,
  .art-card:hover .art-window.has-image .art-img,
  .art-card:hover .art-overlay-svg {
    transform: none !important;
  }
}
