/* ============================================
   Mike's Mixes — desaturated 70s photo palette
   ============================================ */

/* --- Reset + base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #efe6d0;
  color: #3a2f1a;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 350;
  font-variation-settings: 'SOFT' 60;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }

/* --- Grain overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: 0.045;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  margin: 0;
}
h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #3a2f1a;
  line-height: 1;
}
h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #6b7a3a;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid rgba(192, 78, 26, 0.2);
  padding-bottom: 0.5rem;
  display: inline-block;
}
h3 {
  font-size: 1rem;
  color: #c04e1a;
  margin-bottom: 0.5rem;
}
p { margin: 0 0 1rem; }
a { color: #a67c00; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Folio --- */
.folio {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #a67c00;
  opacity: 0.7;
  padding: 1rem 1.5rem 0;
  display: flex;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: 4rem 1.5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-tagline {
  font-family: 'Fraunces', serif;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: #6b7a3a;
  margin-top: 0.5rem;
  font-variation-settings: 'SOFT' 80;
  letter-spacing: 0.03em;
}

/* --- Blinking caret on H1 --- */
h1::after {
  content: '_';
  animation: blink 1s steps(1) infinite;
  color: #c04e1a;
  font-weight: 300;
  margin-left: 0.05em;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* --- Visualizer bars --- */
.hero-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 48px;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 480px;
}
.viz-bar {
  flex: 1;
  background: linear-gradient(to top, #a67c00, #c04e1a);
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  animation: vizPulse 1.2s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.08s);
}
@keyframes vizPulse {
  0%, 100% { height: 8px; }
  30% { height: 48px; }
  50% { height: 24px; }
  70% { height: 40px; }
  85% { height: 12px; }
}

/* --- Scroll-triggered fade + rise --- */
@keyframes fadeRise {
  from { opacity: 0; translate: 0 16px; }
  to   { opacity: 1; translate: 0 0; }
}
section {
  animation: fadeRise 500ms cubic-bezier(0.2, 0.7, 0.1, 1) both;
  animation-timeline: view();
  animation-range: entry 0% cover 25%;
}

/* --- Main content --- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* --- Byline --- */
.byline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a67c00;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

/* --- Drop cap --- */
.dropcap::first-letter {
  font-size: 3.5em;
  float: left;
  line-height: 0.8;
  margin-right: 0.4rem;
  margin-top: 0.1rem;
  color: #c04e1a;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-variation-settings: 'SOFT' 100;
}

/* --- Intro --- */
.intro {
  max-width: 720px;
  margin: 0 auto 4rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* --- Services grid --- */
.services { margin-bottom: 4rem; }
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(166, 124, 0, 0.15);
  padding: 1.5rem;
  border-radius: 4px;
}
.service-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #4a3f2a;
}

/* --- Work list --- */
.work { margin-bottom: 4rem; }
.work-list {
  display: grid;
  gap: 0.5rem;
}
.work-item {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(166, 124, 0, 0.1);
  font-size: 0.95rem;
}
.work-artist { font-weight: 600; color: #3a2f1a; }
.work-title { font-style: italic; color: #5a4f3a; }
.work-role { font-size: 0.8rem; color: #6b7a3a; font-family: 'JetBrains Mono', monospace; text-transform: lowercase; }
.work-year { font-size: 0.8rem; color: #a67c00; font-family: 'JetBrains Mono', monospace; text-align: right; }

/* --- Gear --- */
.gear { margin-bottom: 4rem; max-width: 720px; }
.gear-content p {
  font-size: 1rem;
  line-height: 1.7;
}

/* --- Testimonials --- */
.testimonials { margin-bottom: 4rem; }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.testimonial-grid blockquote {
  margin: 0;
  padding: 1.5rem;
  background: rgba(107, 122, 58, 0.08);
  border-left: 3px solid #6b7a3a;
  border-radius: 0 4px 4px 0;
}
.testimonial-grid blockquote p {
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.testimonial-grid cite {
  font-size: 0.8rem;
  font-style: normal;
  color: #a67c00;
  font-family: 'JetBrains Mono', monospace;
}

/* --- Contact --- */
.contact { margin-bottom: 4rem; max-width: 640px; }
.contact-intro {
  font-size: 1rem;
  margin-bottom: 2rem;
}
form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  color: #6b7a3a;
}
input, textarea {
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(166, 124, 0, 0.25);
  border-radius: 3px;
  background: rgba(255,255,255,0.3);
  color: #3a2f1a;
  transition: border-color 0.2s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: #a67c00;
  background: rgba(255,255,255,0.5);
}
button {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 2rem;
  background: #c04e1a;
  color: #efe6d0;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-start;
}
button:hover { background: #a03e12; }
button:focus-visible {
  outline: 2px solid #a67c00;
  outline-offset: 2px;
}
.form-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #6b7a3a;
}
.contact-direct {
  margin-top: 2rem;
  font-size: 0.9rem;
}
.studio-addr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #a67c00;
  margin-top: 0.25rem;
}

/* --- Footer --- */
.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid rgba(166, 124, 0, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #8a7f6a;
}
.attribution {
  font-size: 0.7rem;
  opacity: 0.5;
}
.attribution a { color: inherit; }

/* --- Dark mode --- */
@media (prefers-color-scheme: dark) {
  body {
    background: #1f1a10;
    color: #d4c9b0;
  }
  h1 { color: #d4c9b0; }
  h2 { color: #8a9a5a; border-bottom-color: rgba(192, 78, 26, 0.3); }
  h3 { color: #d06e3a; }
  a { color: #c4a020; }
  .folio { color: #c4a020; }
  .hero-tagline { color: #8a9a5a; }
  .byline { color: #c4a020; }
  .dropcap::first-letter { color: #d06e3a; }
  .service-card {
    background: rgba(255,255,255,0.06);
    border-color: rgba(196, 160, 32, 0.15);
  }
  .service-card p { color: #b8ad95; }
  .work-item { border-bottom-color: rgba(196, 160, 32, 0.1); }
  .work-artist { color: #d4c9b0; }
  .work-title { color: #a89d85; }
  .work-role { color: #8a9a5a; }
  .work-year { color: #c4a020; }
  .testimonial-grid blockquote {
    background: rgba(107, 122, 58, 0.12);
    border-left-color: #8a9a5a;
  }
  .testimonial-grid cite { color: #c4a020; }
  label { color: #8a9a5a; }
  input, textarea {
    background: rgba(255,255,255,0.06);
    color: #d4c9b0;
    border-color: rgba(196, 160, 32, 0.2);
  }
  input:focus, textarea:focus {
    border-color: #c4a020;
    background: rgba(255,255,255,0.1);
  }
  button { background: #d06e3a; color: #1f1a10; }
  button:hover { background: #b85e2a; }
  .form-status { color: #8a9a5a; }
  .studio-addr { color: #c4a020; }
  .site-footer { border-top-color: rgba(196, 160, 32, 0.15); color: #8a7f6a; }
  body::before { opacity: 0.03; }
  .viz-bar { background: linear-gradient(to top, #c4a020, #d06e3a); }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  section {
    animation: none;
    opacity: 1;
  }
  .viz-bar {
    height: 20px !important;
    animation: none;
  }
  h1::after {
    animation: none;
    opacity: 1;
  }
}

/* --- Mobile --- */
@media (max-width: 600px) {
  .folio { padding: 0.75rem 1rem 0; font-size: 0.6rem; gap: 0.75rem; }
  .hero { padding: 2rem 1rem 2rem; }
  .hero-visualizer { height: 32px; max-width: 320px; }
  main { padding: 0 1rem 3rem; }
  .form-row { grid-template-columns: 1fr; }
  .work-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 0.8rem 0;
  }
  .work-year { text-align: left; }
  .site-footer { flex-direction: column; gap: 0.5rem; text-align: center; }
  .service-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
}
