/* ═══════════════════════════════════════════════
   styles.css — Shared base for all pages
   frontendneeded.com
   ═══════════════════════════════════════════════ */

/* ── Fonts ── */

@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-latin-700-italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-latin-300-normal.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Reset ── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Design tokens ── */

:root {
  --bg: #0f1428;
  --ink: #f0f9ff;
  --muted: rgba(240, 249, 255, 0.4);
  --accent: #c0687a;
  --accent-rgb: 192, 104, 122;
  --rule: rgba(240, 249, 255, 0.06);
  --phi-major: 61.8%;
  --phi-minor: 38.2%;
}

/* ── Base body ── */

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Golden ratio layout shell ── */

.gr-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 2100px;
  width: 100%;
  margin: 0 auto;
}

.gr-top {
  background: var(--bg);
  flex: 0 0 var(--phi-major);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg,
      transparent,
      rgba(45, 212, 191, 0.5),
      rgba(196, 181, 253, 0.4),
      rgba(45, 212, 191, 0.5),
      transparent) 1;
  box-shadow: 0 1px 30px rgba(45, 212, 191, 0.08),
    0 1px 60px rgba(139, 92, 246, 0.05);
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}

.gr-top-art {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: auto;
  object-fit: cover;
  object-position: right center;
  pointer-events: none;
}

.gr-bottom {
  flex: 0 0 var(--phi-minor);
  display: flex;
  overflow: hidden;
}

.gr-left {
  background: var(--bg);
  flex: 0 0 var(--phi-major);
  border-right: 1px solid transparent;
  border-image: linear-gradient(180deg,
      transparent,
      rgba(45, 212, 191, 0.5),
      rgba(196, 181, 253, 0.4),
      rgba(45, 212, 191, 0.5),
      transparent) 1;
  box-shadow: 1px 0 30px rgba(45, 212, 191, 0.08),
    1px 0 60px rgba(139, 92, 246, 0.05);
  padding: 32px 56px;
  overflow-y: auto;
}

.gr-right {
  background: var(--bg);
  flex: 0 0 var(--phi-minor);
  padding: 32px 36px;
  overflow-y: auto;
}

/* ── Typography ── */

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow:
    0 0 4px rgba(240, 249, 255, 0.6),
    0 0 16px rgba(240, 249, 255, 0.25),
    0 0 40px rgba(240, 249, 255, 0.1);
}

.page-subtitle {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 10px;
  font-weight: 300;
  max-width: 32ch;
}

.accent-bar {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-bottom: 20px;
}

.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.body-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink);
}

h2.sub,
h3.sub {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}

p.body-text+h2.sub,
p.body-text+h3.sub {
  margin-top: 20px;
}

.gr-left h2.sub,
.gr-left h3.sub {
  color: var(--accent);
}

/* ── Links ── */

.nav-links {
  list-style: none;
}

.nav-links li {
  margin-bottom: 10px;
}

.nav-links a {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

.nav-links a:hover {
  gap: 10px;
}

.nav-links a::before {
  content: '→';
}

/* ── Site nav ── */

.site-nav {
  background: #0a0e1a;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg,
      transparent,
      rgba(45, 212, 191, 0.25),
      rgba(196, 181, 253, 0.2),
      rgba(45, 212, 191, 0.25),
      transparent) 1;
  box-shadow: 0 1px 12px rgba(45, 212, 191, 0.05);
  padding: 0 56px;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 44px;
  flex-shrink: 0;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
}

.site-nav .nav-home {
  color: var(--accent);
  margin-right: 8px;
}

.site-nav .nav-home:hover {
  color: #ffffff;
}

/* ── Nav dropdown ── */

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-dropdown-toggle {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: default;
  transition: color 0.2s;
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown:focus-within .nav-dropdown-toggle {
  color: #ffffff;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #0a0e1a;
  border-top: 1px solid rgba(45, 212, 191, 0.1);
  min-width: 160px;
  padding: 6px 0;
  z-index: 100;
}

.nav-dropdown-menu a {
  display: block;
  padding: 9px 18px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  color: #ffffff;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

/* ── Skip to content ── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 0;
}

/* ── Photo gallery ──────────────────────────────────────────── */

.photo-gallery {
  position: absolute;
  right: 6%;
  bottom: 8%;
  width: 40%;
  height: 70%;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.photo-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  align-self: stretch;
}

.photo-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(196, 181, 253, 0.15);
  box-shadow:
    0 0 20px rgba(45, 212, 191, 0.08),
    0 0 50px rgba(139, 92, 246, 0.05),
    0 4px 20px rgba(0, 0, 0, 0.3);
}

.photo-caption {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin: 0;
  flex-shrink: 0;
}

.photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.photo-img.active {
  opacity: 1;
}

/* ── Gallery controls ── */

.photo-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.photo-cycle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s, background 0.18s;
}

.photo-cycle-btn:hover {
  transform: scale(1.1);
}

.photo-dot-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

.photo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.25);
  transition: background 0.3s;
}

.photo-dot.active {
  background: var(--accent);
}

/* ═══════════════════════════════════════════════
   Responsive — mobile-first overrides
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Release the viewport lock ── */

  body {
    height: auto;
    overflow: auto;
  }

  .gr-shell {
    flex: none;
    overflow: visible;
  }

  /* ── Hero / top panel ── */

  .gr-top {
    flex: none;
    min-height: 260px;
    padding: 32px 24px;
  }

  .gr-top-art {
    height: 60%;
    opacity: 0.35;
  }

  /* ── Bottom panels → stacked ── */

  .gr-bottom {
    flex: none;
    flex-direction: column;
    overflow: visible;
  }

  .gr-left {
    flex: none;
    border-right: none;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg,
        transparent,
        rgba(45, 212, 191, 0.5),
        rgba(196, 181, 253, 0.4),
        rgba(45, 212, 191, 0.5),
        transparent) 1;
    box-shadow: 0 1px 30px rgba(45, 212, 191, 0.08),
      0 1px 60px rgba(139, 92, 246, 0.05);
    padding: 28px 24px;
  }

  .gr-right {
    flex: none;
    padding: 28px 24px;
  }

  /* ── Nav ── */

  .site-nav {
    padding: 0 16px;
    gap: 14px;
    height: 40px;
  }

  .site-nav a {
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .nav-dropdown-toggle {
    font-size: 0.7rem;
  }

  .nav-dropdown-menu {
    position: fixed;
    top: 40px;
    left: 0;
    width: 100%;
    min-width: unset;
  }

  /* ── Typography tweaks ── */

  .page-title {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
  }

  .page-subtitle {
    font-size: 0.88rem;
    max-width: 50%;
  }

  .body-text {
    font-size: 0.88rem;
  }

  /* ── Photo gallery (mobile) ── */

  .photo-gallery {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
  }

  .photo-frame {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    flex: none;
  }

  .photo-nav {
    flex-direction: row;
    gap: 8px;
  }

  .photo-dot-row {
    flex-direction: row;
  }
}