/* ==========================================================================
   Robert Colt — robertcolt.com
   Design: Daedalus (design-spec.md)
   Build: Tekton
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  --concrete: #E5DED4;
  --ink: #1C1917;
  --graphite: #57534E;
  --warm-800: #78716C;
  --ember: #9A3412;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Familjen Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --container-max: 1080px;
  --container-padding: clamp(24px, 5vw, 48px);
  --reading-width: 62ch;

  --section-gap: clamp(80px, 12vw, 140px);
  --subsection-gap: clamp(40px, 6vw, 64px);
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  line-height: 1.72;
  color: var(--graphite);
  background-color: var(--concrete);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ember);
  text-decoration: none;
  transition: color 200ms ease;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Focus states — WCAG AA */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. Skip Link
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--concrete);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

/* --------------------------------------------------------------------------
   4. Container
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: backdrop-filter 300ms ease, -webkit-backdrop-filter 300ms ease, background-color 300ms ease;
}

.site-header.scrolled {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background-color: rgba(229, 222, 212, 0.8);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px var(--container-padding);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
  text-decoration: none;
  transition: color 200ms ease;
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

/* Hamburger — mobile only */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--ink);
  margin: 5px 0;
  transition: transform 300ms ease, opacity 300ms ease;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(229, 222, 212, 0.08) 0%,
    rgba(229, 222, 212, 0.15) 35%,
    rgba(229, 222, 212, 0.72) 68%,
    var(--concrete) 88%
  );
}

.hero-content {
  position: absolute;
  bottom: clamp(40px, 9vh, 80px);
  left: 0;
  right: 0;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(12px);
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 1;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(12px);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.4;
  color: var(--graphite);
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(12px);
}

.hero-cta {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--concrete);
  background-color: var(--ember);
  padding: 14px 32px;
  border: none;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, transform 200ms ease;
  opacity: 0;
  transform: translateY(12px);
}

.hero-cta:hover {
  background-color: #7C2D12;
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--concrete);
}

/* Hero animation states */
.hero-eyebrow.animate-in,
.hero-name.animate-in,
.hero-subtitle.animate-in,
.hero-cta.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   7. Sections — General
   -------------------------------------------------------------------------- */
.section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 16px;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: 'opsz' 72, 'SOFT' 50, 'WONK' 1;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--subsection-gap);
}

.body-text {
  max-width: var(--reading-width);
}

.body-text p {
  margin-bottom: 1.5em;
}

/* --------------------------------------------------------------------------
   8. Scroll Animation
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --------------------------------------------------------------------------
   9. Pull Quotes
   -------------------------------------------------------------------------- */
blockquote.pull-quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-variation-settings: 'opsz' 36, 'SOFT' 100, 'WONK' 0;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.5;
  color: var(--ink);
  text-align: center;
  max-width: var(--container-max);
  margin: 48px auto;
  padding: 0;
  border: none;
}

blockquote.pull-quote p {
  margin: 0;
}

blockquote.pull-quote cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--warm-800);
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   10. Figures / Photos
   -------------------------------------------------------------------------- */
figure {
  margin: 0;
}

figure img {
  width: 100%;
  border: 1px solid rgba(28, 25, 23, 0.08);
}

figure.no-border img {
  border: none;
}

figcaption {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--warm-800);
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   11. Philosophy Section
   -------------------------------------------------------------------------- */
.philosophy-photo {
  margin-bottom: var(--subsection-gap);
}

/* --------------------------------------------------------------------------
   12. Story Section
   -------------------------------------------------------------------------- */
.story-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--subsection-gap);
  margin-bottom: var(--subsection-gap);
}

.story-block--photo-right {
  grid-template-columns: 1fr;
}

.story-block--photo-left {
  grid-template-columns: 1fr;
}

/* --------------------------------------------------------------------------
   13. Dark Beat — Cancer
   -------------------------------------------------------------------------- */
.dark-beat {
  background: var(--ink);
  color: var(--concrete);
  padding: 48px 0;
  margin-left: calc(-1 * var(--container-padding));
  margin-right: calc(-1 * var(--container-padding));
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Full-width breakout for when inside a container */
.dark-beat-wrapper {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: var(--ink);
  color: var(--concrete);
  padding: 48px 0;
}

.dark-beat-wrapper .container {
  max-width: var(--container-max);
}

.dark-beat-wrapper p {
  max-width: var(--reading-width);
  color: var(--concrete);
  margin-bottom: 1.4em;
  line-height: 1.78;
}

.dark-beat-wrapper p:last-child {
  margin-bottom: 0;
}

.dark-beat-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm-800);
  margin-bottom: 28px !important;
}

/* Statement quote — the "That's it. I quit." moments */
.statement-quote {
  margin: clamp(48px, 8vw, 80px) auto;
  max-width: 780px;
  padding: 0 clamp(24px, 5vw, 48px);
}

.statement-quote p {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-variation-settings: 'opsz' 72, 'SOFT' 60, 'WONK' 1;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-align: center;
}

/* Inline quote — inside a story-block text column */
.inline-quote {
  margin: 28px 0 28px 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--ember);
  border-right: none;
}

.inline-quote p {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
}

/* --------------------------------------------------------------------------
   14. Classes Section
   -------------------------------------------------------------------------- */
.classes-sub-block {
  margin-bottom: var(--subsection-gap);
}

.classes-sub-block h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: 'opsz' 72, 'SOFT' 50, 'WONK' 1;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 20px;
}

.classes-photo {
  max-width: 50%;
  margin: var(--subsection-gap) auto;
}

.classes-photo img {
  width: 100%;
}

.schedule-placeholder {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--warm-800);
  font-size: 0.95rem;
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   15. Credentials Section
   -------------------------------------------------------------------------- */
.credentials-group {
  margin-bottom: var(--subsection-gap);
}

.credentials-group h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: 'opsz' 72, 'SOFT' 50, 'WONK' 1;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 20px;
}

.credentials-list {
  list-style: none;
  padding: 0;
}

.credentials-list li {
  margin-bottom: 1.2em;
  line-height: 1.6;
}

.credentials-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  color: var(--ink);
}

.credentials-context {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  color: var(--graphite);
}

/* --------------------------------------------------------------------------
   16. Contact Section
   -------------------------------------------------------------------------- */
.contact-intro {
  max-width: var(--reading-width);
  margin-bottom: var(--subsection-gap);
}

.contact-form {
  max-width: 560px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--concrete);
  border: 1px solid rgba(28, 25, 23, 0.15);
  border-radius: 0;
  padding: 12px 16px;
  transition: border-color 200ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2357534E' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--ember);
  outline: none;
}

.form-submit {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--concrete);
  background-color: var(--ember);
  padding: 14px 32px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 200ms ease, transform 200ms ease;
}

.form-submit:hover {
  background-color: #7C2D12;
  transform: translateY(-1px);
}

.contact-email-fallback {
  margin-top: 32px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--graphite);
}

.contact-email-fallback a {
  color: var(--ember);
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding-top: var(--section-gap);
  padding-bottom: 48px;
  text-align: center;
}

.footer-rule {
  border: none;
  border-top: 1px solid rgba(28, 25, 23, 0.1);
  max-width: 200px;
  margin: 0 auto var(--subsection-gap) auto;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.footer-tagline {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--warm-800);
  margin-bottom: 4px;
}

.footer-location {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--warm-800);
  margin-bottom: 12px;
}

.footer-copyright {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--warm-800);
}

/* --------------------------------------------------------------------------
   18. Film Grain Overlay
   -------------------------------------------------------------------------- */
.film-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  mix-blend-mode: multiply;
}

/* --------------------------------------------------------------------------
   19. Desktop Layout (> 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
  .story-block--photo-right {
    grid-template-columns: 1fr 40%;
    gap: 48px;
    align-items: start;
  }

  .story-block--photo-left {
    grid-template-columns: 40% 1fr;
    gap: 48px;
    align-items: start;
  }

  /* Pull quote desktop — centered, no border */
  blockquote.pull-quote {
    border-left: none;
    padding-left: 0;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   20. Tablet (640px - 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 641px) and (max-width: 1024px) {
  .story-block--photo-right {
    grid-template-columns: 1fr 40%;
    gap: 32px;
    align-items: start;
  }

  .story-block--photo-left {
    grid-template-columns: 40% 1fr;
    gap: 32px;
    align-items: start;
  }
}

/* --------------------------------------------------------------------------
   21. Mobile (< 640px)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  /* Nav */
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--concrete);
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 150;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 16px;
    letter-spacing: 0.08em;
    color: var(--ink);
  }

  .hamburger {
    display: block;
  }

  /* Hero */
  .hero {
    text-align: center;
  }

  .hero-cta {
    width: 100%;
    text-align: center;
  }

  /* Pull quotes — left border on mobile */
  blockquote.pull-quote {
    text-align: left;
    border-left: 2px solid var(--ember);
    padding-left: 24px;
  }

  /* Classes photo full width on mobile */
  .classes-photo {
    max-width: 100%;
  }

  /* Film grain — disable below 640px */
  .film-grain {
    display: none;
  }

  /* Story blocks stack */
  .story-block--photo-right,
  .story-block--photo-left {
    grid-template-columns: 1fr;
  }

  /* On mobile, photo-right: photo goes above text */
  .story-block--photo-right .story-photo {
    order: -1;
  }
}

/* --------------------------------------------------------------------------
   22. Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-eyebrow,
  .hero-name,
  .hero-subtitle,
  .hero-cta {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-eyebrow.animate-in,
  .hero-name.animate-in,
  .hero-subtitle.animate-in,
  .hero-cta.animate-in {
    transition: none;
  }

  * {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}
