/* Seven Marks Studios — Redesign */

/* ─── Tokens ─────────────────────────────────────────── */

:root[data-theme="dark"] {
  /* Surfaces */
  --bg-primary:    #0a1a33;  /* deep navy — page bg */
  --bg-secondary:  #0f2442;  /* cards, panels */
  --bg-tertiary:   #152d52;  /* elevated surfaces, hover */
  --bg-overlay:    rgba(10, 26, 51, 0.85);

  /* Text */
  --text-primary:   #f5f0e6;  /* warm white — body */
  --text-secondary: #a8b3c7;  /* muted blue-gray */
  --text-tertiary:  #6b7a94;  /* hints, captions */
  --text-inverse:   #0a1a33;

  /* Brand accent (amber gold) */
  --accent:        #d4a24c;  /* logo, links, primary actions */
  --accent-hover:  #e0b562;
  --accent-muted:  #8a6a31;
  --accent-subtle: rgba(212, 162, 76, 0.12);

  /* Borders */
  --border-subtle:  rgba(212, 162, 76, 0.12);
  --border-default: rgba(212, 162, 76, 0.22);
  --border-strong:  #1e3a64;

  /* Semantic */
  --success: #6ab87a;
  --warning: #e0b562;
  --danger:  #d46a6a;
  --info:    #60a5fa;

  /* Background Gradient Orbs */
  --orb-1: rgba(212, 162, 76, 0.08); /* amber glow */
  --orb-2: rgba(96, 165, 250, 0.05); /* subtle blue glow */

  /* Utilities */
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] {
  /* Surfaces */
  --bg-primary:    #fdfbf6;  /* warm parchment */
  --bg-secondary:  #f5efe0;  /* cream cards */
  --bg-tertiary:   #ebe3d0;  /* elevated, hover */
  --bg-overlay:    rgba(253, 251, 246, 0.92);

  /* Text */
  --text-primary:   #0a1a33;  /* deep navy */
  --text-secondary: #3d4a66;
  --text-tertiary:  #6b7890;
  --text-inverse:   #fdfbf6;

  /* Brand accent (darkened for WCAG AA on cream) */
  --accent:        #b8862f;  /* body text, links */
  --accent-hover:  #a07428;
  --accent-muted:  #d4a24c;  /* can use lighter variant for decorative */
  --accent-subtle: rgba(184, 134, 47, 0.10);

  /* Borders */
  --border-subtle:  rgba(10, 26, 51, 0.08);
  --border-default: rgba(10, 26, 51, 0.15);
  --border-strong:  #d4c9a8;

  /* Semantic */
  --success: #4a8f5a;
  --warning: #a07428;
  --danger:  #b04545;
  --info:    #2563eb;

  /* Background Gradient Orbs */
  --orb-1: rgba(184, 134, 47, 0.05);
  --orb-2: rgba(37, 99, 235, 0.03);

  /* Utilities */
  --shadow-glass: 0 12px 40px rgba(10, 26, 51, 0.06);
}

/* ─── Reset ───────────────────────────────────────────── */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Outfit", "Inter", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── Dynamic Background ──────────────────────────────── */

.dynamic-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 20s infinite alternate ease-in-out;
  transition: background-color 0.4s ease;
}

.orb-1 {
  width: 70vw;
  height: 70vw;
  max-width: 700px;
  max-height: 700px;
  background: var(--orb-1);
  top: -20%;
  left: -20%;
  animation-delay: 0s;
}

.orb-2 {
  width: 60vw;
  height: 60vw;
  max-width: 600px;
  max-height: 600px;
  background: var(--orb-2);
  bottom: -20%;
  right: -10%;
  animation-duration: 25s;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(6%, 12%) scale(1.05); }
  66% { transform: translate(-6%, 6%) scale(0.95); }
  100% { transform: translate(3%, -8%) scale(1.02); }
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 70%);
  opacity: 0.8;
  transition: opacity 0.4s ease;
}

/* ─── Skip link ───────────────────────────────────────── */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  color: var(--accent);
  z-index: 300;
  border-radius: 4px;
}
.skip-link:focus { left: 1rem; }

/* ─── Layout & Glass Panel ────────────────────────────── */

.page-wrapper {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 2rem;
  width: 100%;
}

.glass-panel {
  width: 100%;
  max-width: 30rem;
  padding: 4rem 3rem;
  background: var(--bg-overlay);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  border-radius: 32px;
  box-shadow: var(--shadow-glass);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Internal panel highlight for 3D effect */
.glass-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ─── Typography & Content Elements ───────────────────── */

.logo-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 2.25rem;
}

.logo {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

h1 {
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0;
}

.tagline {
  margin: 0.85rem 0 0;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
}

.contact-wrapper {
  margin: 1.75rem 0 0;
}

.contact {
  margin: 0;
  font-size: 0.95rem;
}

.interactive-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.2s ease;
}

.interactive-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1), background-color 0.2s ease;
}

.interactive-link:hover {
  color: var(--accent-hover);
}

.interactive-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
  background-color: var(--accent-hover);
}

.divider {
  width: 3.5rem;
  height: 2px;
  border-radius: 2px;
  background: var(--border-subtle);
  margin: 2.75rem auto;
}

section { width: 100%; }

h2 {
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.15rem;
}

section p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
  font-weight: 400;
}

footer {
  width: 100%;
  text-align: center;
  margin-top: 3.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

footer p { margin: 0; }

/* ─── Theme Toggle Button ─────────────────────────────── */

.theme-btn {
  position: fixed;
  bottom: calc(1.75rem + env(safe-area-inset-bottom, 0));
  right: 1.75rem;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: color 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              border-color 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              background-color 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-tertiary);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.theme-btn:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.theme-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.theme-btn svg {
  display: block;
  flex-shrink: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-btn:hover svg {
  transform: rotate(15deg);
}

/* ─── Animations ──────────────────────────────────────── */

.animate-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-stretch {
  opacity: 0;
  transform: scaleX(0.1);
  animation: stretchIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stretchIn {
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.25s; }
.delay-3 { animation-delay: 0.35s; }
.delay-4 { animation-delay: 0.45s; }
.delay-5 { animation-delay: 0.55s; }
.delay-6 { animation-delay: 0.75s; }

.animate-scale-in {
  animation: scaleIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  animation-delay: 0.9s;
  opacity: 0;
  transform: scale(0.3) translateY(20px);
}

@keyframes scaleIn {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ─── Media Queries ───────────────────────────────────── */
@media (max-width: 480px) {
  .glass-panel {
    padding: 3rem 1.75rem;
    border-radius: 24px;
  }
  .page-wrapper {
    padding-top: 3rem;
  }
}
