/*
Theme Name: SonicLoop
Theme URI: https://sonicloop.ai
Author: SonicLoop
Author URI: https://sonicloop.ai
Description: One-page brand site for SonicLoop — an Arts Integration music and creativity program built on Sonic Pi. Custom single-page theme. Editorial palette (paper / ink / rust), Fraunces + Manrope + JetBrains Mono.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: All rights reserved
Text Domain: sonicloop
*/

:root {
  --ink: #1A1714; --ink-soft: #6B6359; --ink-faint: #A89F92;
  --paper: #F4EEE4; --paper-deep: #EBE2D3; --paper-deeper: #DDD2BE;
  --rust: #BE3A1F; --rust-soft: #E8927F; --rust-deep: #8E2912; --rust-fill: #FAECE7;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-weight: 400; font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--rust); color: var(--paper); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

/* ---------- NAV ---------- */
.sl-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,238,228,0.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--paper-deeper);
}
.sl-nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.lockup { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.lockup svg { display: block; }
.lockup .wm {
  font-family: 'Fraunces', serif; font-variation-settings: "opsz" 72, "SOFT" 25;
  font-weight: 500; font-size: 22px; letter-spacing: -0.015em; color: var(--ink);
  line-height: 1;
}
.lockup .wm em { font-style: italic; color: var(--rust); font-weight: 500; }
.lockup .wm .tm {
  font-family: 'Manrope', sans-serif; font-size: 0.4em; vertical-align: 0.85em;
  margin-left: 1px; color: var(--rust); font-weight: 500; font-style: normal;
}
.nav-links {
  display: flex; gap: 28px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.nav-links a { color: var(--ink-soft); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--rust); }

/* ---------- HERO ---------- */
.hero { padding: 88px 0 76px; }
.hero-glyph { margin-bottom: 40px; }
.hero-glyph svg { display: block; width: 260px; height: auto; }

.rv { opacity: 0; transform: translateY(8px); animation: rise 0.9s cubic-bezier(.2,.7,.2,1) forwards; }
.rv-1 { animation-delay: 0.10s; }
.rv-2 { animation-delay: 0.30s; }
.rv-3 { animation-delay: 0.55s; }
.rv-4 { animation-delay: 0.78s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.draw {
  stroke-dasharray: var(--len, 260);
  stroke-dashoffset: var(--len, 260);
  animation: draw 1.1s ease forwards;
}
.draw-1 { animation-delay: 0.35s; }
.draw-2 { animation-delay: 0.55s; }
.draw-3 { animation-delay: 0.75s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fade-note { opacity: 0; animation: noteIn 0.5s ease forwards; }
.note-1 { animation-delay: 0.25s; } .note-2 { animation-delay: 0.32s; } .note-3 { animation-delay: 0.40s; }
@keyframes noteIn { to { opacity: 1; } }

h1.hero-line {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 72, "SOFT" 80;
  font-weight: 400; font-size: clamp(26px, 4.3vw, 42px);
  line-height: 1.12; letter-spacing: -0.015em; color: var(--ink);
  max-width: 18ch;
}
h1.hero-line em {
  font-style: italic; color: var(--rust);
  font-variation-settings: "opsz" 72, "SOFT" 80; font-weight: 500;
}
h1.hero-line .dash { color: var(--rust); }
h1.hero-line .lbl { white-space: nowrap; }
.tagline {
  font-family: 'JetBrains Mono', monospace; font-size: 14px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--rust);
  margin-top: 28px;
}
.tagline .reclaim { color: var(--ink); font-weight: 600; }
.hero-thesis {
  font-family: 'Fraunces', serif; font-variation-settings: "opsz" 24, "SOFT" 60;
  font-style: italic; font-size: 19px; color: var(--ink-soft);
  margin-top: 56px; max-width: 50ch; line-height: 1.45;
}
.hero-facts {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint);
  margin-top: 12px;
}

.rule { height: 1px; background: var(--paper-deeper); margin: 0; }
.section { padding: 76px 0; }
.section-eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--rust);
  margin-bottom: 18px;
}

/* ---------- ABOUT ---------- */
.about { max-width: 660px; }
.about p { margin-bottom: 18px; }
.about p strong { font-weight: 700; }
.about p em { font-style: italic; }
.about code {
  font-family: 'JetBrains Mono', monospace; font-size: 0.86em;
  background: var(--rust-fill); color: var(--rust-deep);
  padding: 2px 7px; border-radius: 3px;
}
.about .field { color: var(--rust); font-weight: 600; }
.about .closer {
  font-family: 'Fraunces', serif; font-variation-settings: "opsz" 40;
  font-size: 22px; line-height: 1.3; color: var(--ink);
  border-left: 3px solid var(--rust); padding-left: 20px;
  margin-top: 34px; font-style: italic;
}

.legs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--paper-deeper); border: 1px solid var(--paper-deeper);
  margin: 44px 0 4px;
}
.leg { background: var(--paper); padding: 24px 22px; }
.leg .leg-num {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.18em; color: var(--rust); margin-bottom: 10px;
}
.leg .leg-h {
  font-family: 'Fraunces', serif; font-variation-settings: "opsz" 40;
  font-weight: 500; font-size: 19px; letter-spacing: -0.01em;
  margin-bottom: 7px; color: var(--ink);
}
.leg .leg-h em { font-style: italic; color: var(--rust); }
.leg p { font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); margin: 0; }

/* ---------- CONTACT ---------- */
.contact { background: var(--ink); color: var(--paper); }
.contact .wrap { padding-top: 72px; padding-bottom: 72px; }
.contact .section-eyebrow { color: var(--rust-soft); }
.contact h2 {
  font-family: 'Fraunces', serif; font-variation-settings: "opsz" 96, "SOFT" 60;
  font-weight: 400; font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.05; letter-spacing: -0.022em; color: var(--paper);
  max-width: 18ch; margin-bottom: 30px;
}
.contact h2 em { font-style: italic; color: var(--rust-soft); font-weight: 500; }
.contact-rows {
  display: flex; flex-wrap: wrap; gap: 14px 56px;
  font-family: 'JetBrains Mono', monospace; font-size: 16px;
  letter-spacing: 0.04em;
}
.contact-rows a { color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--rust); padding-bottom: 2px; transition: color 0.2s, border-color 0.2s; }
.contact-rows a:hover { color: var(--rust-soft); border-color: var(--rust-soft); }
.contact-rows .lab {
  display: block; font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px;
}

/* ---------- FOOTER ---------- */
.sl-footer { background: var(--ink); border-top: 1px solid #2a2622; }
.sl-footer .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 26px; padding-bottom: 30px; flex-wrap: wrap; gap: 14px;
}
.sl-footer .f-lockup { display: flex; align-items: center; gap: 10px; }
.sl-footer .f-lockup .wm {
  font-family: 'Fraunces', serif; font-variation-settings: "opsz" 60, "SOFT" 25;
  font-weight: 500; font-size: 17px; color: var(--paper); letter-spacing: -0.01em;
}
.sl-footer .f-lockup .wm em { font-style: italic; color: var(--rust-soft); }
.sl-footer .f-lockup .wm .tm {
  font-family: 'Manrope', sans-serif; font-size: 0.42em; vertical-align: 0.8em;
  color: var(--rust-soft); font-weight: 500; font-style: normal;
}
.sl-footer .f-meta {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 22px; }
  .nav-links { gap: 18px; font-size: 11px; }
  .hero { padding: 56px 0 52px; }
  .hero-glyph svg { width: 200px; }
  .legs { grid-template-columns: 1fr; }
  .contact-rows { gap: 18px 0; flex-direction: column; }
  .section { padding: 56px 0; }
}
@media (max-width: 420px) {
  .nav-links a:nth-child(1) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rv, .draw, .fade-note { animation: none !important; opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
}
