/* New Ritual - Design System */

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --color-accent: #0693e3;
  --color-border: #e5e5e5;

  --font-size-base: 14px;
  --font-size-medium: 20px;
  --font-size-large: 32px;
  --font-size-hero: 42px;

  --max-width: 800px;
  --spacing-unit: 1rem;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4 {
  margin: 0 0 1rem 0;
  font-weight: 400;
  line-height: 1.3;
}

h1 {
  font-size: var(--font-size-hero);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-large);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--font-size-medium);
}

p {
  margin: 0 0 1.5rem 0;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
}

.site-title {
  font-size: var(--font-size-medium);
  font-weight: 600;
  margin: 0;
}

.site-title a {
  color: var(--color-text);
}

nav {
  margin-top: 1rem;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

nav a:hover,
nav a.active {
  color: var(--color-text);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

/* Main Content */
main {
  padding: 3rem 0;
  min-height: 60vh;
}

.page-title {
  margin-bottom: 2rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-text);
}

.intro {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.quote {
  font-style: italic;
  color: var(--color-text-muted);
  border-left: 2px solid var(--color-border);
  padding-left: 1.5rem;
  margin: 2rem 0;
}

/* Entry Points List (Home) */
.entry-points {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.entry-points li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.entry-points li:last-child {
  border-bottom: none;
}

.entry-points a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
  display: block;
  margin-bottom: 0.25rem;
}

.entry-points p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Sections */
section {
  margin-bottom: 3rem;
}

section h2 {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

section h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Credits */
.credits {
  background: #fafafa;
  padding: 1.5rem;
  border-radius: 4px;
  margin: 2rem 0;
}

.credits p {
  margin: 0.25rem 0;
}

/* Embeds */
.embed-container {
  margin: 2rem 0;
}

.embed-container iframe {
  max-width: 100%;
}

/* Photo Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.gallery-placeholder {
  background: #f5f5f5;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--color-text-muted);
  border-radius: 4px;
  border: 1px dashed var(--color-border);
}

/* Inquiries */
.inquiries {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.inquiries li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.inquiries li::before {
  content: "\2014";
  position: absolute;
  left: 0;
}

/* Footer */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.social-links a {
  color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --font-size-hero: 32px;
    --font-size-large: 24px;
    --font-size-medium: 18px;
  }

  .nav-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
  }

  nav.open ul {
    display: flex;
  }

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

  .social-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Anchor offset for section links */
section[id] {
  scroll-margin-top: 2rem;
}

/* Dodecahedron page background */
.page-dodecahedron {
  background-image: url('../images/floating dodeca wire in space.png');
  background-repeat: no-repeat;
  background-position: center 120px;
  background-size: 800px auto;
  background-attachment: fixed;
}

.page-dodecahedron main {
  background: rgba(255, 255, 255, 0.85);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  cursor: pointer;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.zoomable {
  width: 100%;
  transition: opacity 0.2s ease;
}

.zoomable:hover {
  opacity: 0.85;
}
