/* ==========================================================================
   dillonrcarpenter.com — hand-built, no framework
   ========================================================================== */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/spacegrotesk-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #0c0c0e;
  --bg-alt:    #111114;
  --card:      #17171c;
  --line:      rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text:      #f0ede6;
  --muted:     #a8a29a;
  --accent:    #e8433f;
  --accent-soft: rgba(232, 67, 63, 0.12);
  --display:   'Space Grotesk', 'Segoe UI', sans-serif;
  --body:      'Inter', 'Segoe UI', sans-serif;
  --maxw:      1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  font-family: var(--display);
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* --- Nav ------------------------------------------------------------- */

#main-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(12, 12, 14, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: transform 0.3s ease;
}
#main-nav.nav-hidden { transform: translateY(-100%); }

.nav-wordmark,
.footer-wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.nav-wordmark span,
.footer-wordmark span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}
.nav-links a {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-links .nav-cta {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 9px 18px;
  transition: background 0.2s, color 0.2s;
}
.nav-links .nav-cta:hover { background: var(--accent); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}

/* --- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--text);
  padding: 14px 30px;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--text); color: var(--bg); }

.btn-fill {
  background: #d23430; /* darker than --accent: keeps 4.5:1 with white text */
  border-color: #d23430;
  color: #fff;
}
.btn-fill:hover { background: #b9302c; border-color: #b9302c; color: #fff; }

/* --- Sections ---------------------------------------------------------- */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 104px 40px;
}
.section-alt {
  max-width: none;
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.section-alt > * { max-width: calc(var(--maxw) - 80px); margin-left: auto; margin-right: auto; }

.eye {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.eye::before {
  content: '';
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.section-lede {
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 44px;
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg,
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-bg img { object-fit: cover; object-position: center 30%; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(12,12,14,0.92) 0%, rgba(12,12,14,0.72) 45%, rgba(12,12,14,0.35) 100%),
    linear-gradient(to top, rgba(12,12,14,0.95) 0%, rgba(12,12,14,0.2) 40%);
}
.hero-content {
  position: relative;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 140px 40px 80px;
  animation: heroIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-content h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
}
.hero-lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 40px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Reel --------------------------------------------------------------- */

.reel-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
}
.reel-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.reel-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
}
.reel-play picture,
.reel-play img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s;
}
.reel-play:hover img { transform: scale(1.02); }
.reel-play-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: rgba(12, 12, 14, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  color: #fff;
  transition: background 0.2s, transform 0.2s;
}
.reel-play-badge svg { margin-left: 4px; }
.reel-play:hover .reel-play-badge {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.06);
}
.reel-duration {
  position: absolute;
  right: 16px; bottom: 14px;
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #fff;
  background: rgba(12, 12, 14, 0.72);
  padding: 5px 10px;
}
.reel-note {
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* --- Work grid ------------------------------------------------------------ */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.work-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  transition: border-color 0.25s, transform 0.25s;
}
.work-card:hover { border-color: var(--line); transform: translateY(-3px); }
.work-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: saturate(0.92);
  transition: filter 0.3s;
}
.work-card:hover img { filter: saturate(1.05); }
.work-card figcaption { padding: 18px 20px 20px; }
.work-card figcaption strong {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.work-card figcaption span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* --- Services -------------------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.service-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  padding: 32px 34px;
  transition: border-color 0.25s;
}
.service-card:hover { border-color: rgba(232, 67, 63, 0.45); }
.service-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.service-price {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.service-price span { color: var(--accent); padding: 0 2px; }
.service-price em {
  font-style: normal;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}
.service-card > p:last-child {
  font-size: 0.92rem;
  color: var(--muted);
}
.services-note {
  margin-top: 28px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* --- About -------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: center;
}
.about-photo img {
  width: 100%;
  border: 1px solid var(--line);
  filter: saturate(0.95);
}
.about-text p:not(.eye) {
  color: var(--muted);
  margin-bottom: 20px;
}
.about-facts {
  display: flex;
  gap: 40px;
  list-style: none;
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
.about-facts strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1.15;
}
.about-facts span {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- Quote form -------------------------------------------------------------- */

.quote-form { max-width: 720px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-family: var(--display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--body);
  font-size: 0.95rem;
  padding: 13px 14px;
  border-radius: 0;
  transition: border-color 0.2s;
}
.form-field select { appearance: none; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field ::placeholder { color: rgba(168, 162, 154, 0.6); }

.btn-submit { margin-top: 6px; }
.btn-submit[disabled] { opacity: 0.55; cursor: wait; }

.form-status {
  margin-top: 16px;
  font-size: 0.92rem;
  min-height: 1.5em;
}
.form-status.ok { color: #7fd18a; }
.form-status.err { color: var(--accent); }

/* --- Footer -------------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--line-soft);
  text-align: center;
  padding: 72px 24px 56px;
}
.footer-wordmark { font-size: 1.15rem; }
.footer-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0 26px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  list-style: none;
  margin-bottom: 30px;
}
.footer-links a {
  font-family: var(--display);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.8rem; color: rgba(168, 162, 154, 0.8); }

/* --- Reveal on scroll -------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-content { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* --- Responsive ----------------------------------------------------------------- */

@media (max-width: 800px) {
  #main-nav { padding: 14px 20px; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(12, 12, 14, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 8px 0 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { text-align: center; }
  .nav-links a { display: block; padding: 14px 20px; }
  .nav-links .nav-cta { border: 0; color: var(--accent); }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 72px 20px; }
  .section-alt > * { max-width: none; }
  .hero-content { padding: 120px 20px 70px; }

  .work-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .about-facts { gap: 26px; flex-wrap: wrap; }
}
