/* ===========================================================================
   Daybright Studio: "Bold Block" direction
   Flat earthy color-blocking · heavy outlines · grotesque type · 12-point star
   =========================================================================== */

:root {
  --paper:    #ECE5D5;
  --espresso: #322B26;
  --sage:     #B6C2C0;
  --rust:     #9C4A1F;
  --ink:      #2C2622;
  --muted:    #5A5048;

  /* warm cream tints for text on dark / colored bands */
  --cream-1:  #D8D2C2;
  --cream-2:  #F2E4D9;
  --cream-3:  #F0D9C8;

  --maxw: 1180px;
  --pad: 36px;

  --rule: 3px solid var(--espresso);
  --border: 2px solid var(--espresso);

  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'Hanken Grotesque', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--espresso);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  /* clip (not hidden) avoids forcing overflow-y:auto, which would create a
     scroll container and break the sticky nav */
  overflow-x: clip;
  max-width: 100%;
}

::selection { background: var(--espresso); color: var(--paper); }

a { color: inherit; }

ul { list-style: none; margin: 0; padding: 0; }

/* --- Star motif --------------------------------------------------------- */
.star { display: block; }
.star use { fill: currentColor; stroke: currentColor; stroke-width: 1.5; }

@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes spinRev { to { transform: rotate(-360deg); } }

.spin-22     { animation: spin 22s linear infinite; }
.spin-26     { animation: spin 26s linear infinite; }
.spin-40     { animation: spin 40s linear infinite; }
.spin-56     { animation: spin 56s linear infinite; }
.spin-60     { animation: spin 60s linear infinite; }
.spin-rev-64 { animation: spinRev 64s linear infinite; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 13px 22px;
  border: var(--border);
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.btn-primary   { background: var(--espresso); color: var(--paper); }
.btn-primary:hover { background: var(--rust); }

.btn-secondary { background: transparent; color: var(--espresso); }
.btn-secondary:hover { background: var(--espresso); color: var(--paper); }

.btn-accent    { background: var(--rust); color: var(--paper); padding: 9px 16px; }
.btn-accent:hover { background: var(--espresso); }

/* "View project" on espresso band: paper fill, hover → rust */
.btn-on-dark   { background: var(--paper); color: var(--espresso); border-color: var(--paper); }
.btn-on-dark:hover { background: var(--rust); color: var(--paper); border-color: var(--rust); }

/* "View project" on rust band: paper fill, hover → espresso */
.btn-on-rust   { background: var(--paper); color: var(--rust); border-color: var(--paper); }
.btn-on-rust:hover { background: var(--espresso); color: var(--paper); border-color: var(--espresso); }

/* contact mailto button */
.btn-contact   { font-size: 16px; padding: 17px 30px; background: var(--paper); color: var(--espresso); border-color: var(--paper); }
.btn-contact:hover { background: var(--rust); color: var(--paper); border-color: var(--rust); }

/* --- Shared type -------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin: 0 0 26px;
}
.eyebrow-muted { color: var(--muted); letter-spacing: 0.12em; margin-bottom: 22px; }

.meta {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* --- Nav ---------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--pad);
  background: var(--paper);
  border-bottom: var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--espresso); }
.brand .star { width: 26px; height: 26px; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--espresso);
  padding: 8px 14px;
}
.nav-link:hover { color: var(--rust); }

/* Hamburger toggle, hidden on desktop, revealed at the mobile breakpoint */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: var(--border);
  color: var(--espresso);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2.5px;
  background: currentColor;
  transform: translateX(-50%);
  transition: transform 180ms ease, opacity 120ms ease;
}
.nav-toggle-bars { top: 50%; transform: translate(-50%, -50%); }
.nav-toggle-bars::before { content: ""; top: -7px; }
.nav-toggle-bars::after  { content: ""; top: 7px; }
/* open state → X */
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-open .nav-toggle-bars::after  { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* --- Hero --------------------------------------------------------------- */
.hero {
  background: var(--sage);
  padding: 64px var(--pad) 80px;
  text-align: center;
  border-bottom: var(--rule);
}
.hero-star { width: clamp(120px, 18vw, 200px); height: clamp(120px, 18vw, 200px); margin: 0 auto 38px; color: var(--espresso); }
.hero .eyebrow { color: var(--espresso); }
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 10vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0 auto;
  max-width: 1100px;
  color: var(--espresso);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 42px; }
.btn-primary, .btn-secondary { padding: 15px 26px; }

/* Work page hero variant: intro copy under the title.
   Title keeps the same bold, uppercase treatment as the home hero so the
   two pages read consistently. */
.work-hero {
  border-bottom: 1px solid rgba(46, 40, 35, 0.18);
}
.work-hero-lead {
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.55;
  color: var(--ink);
  max-width: 720px;
  margin: 32px auto 0;
}

/* --- Marquee ------------------------------------------------------------ */
.marquee {
  background: var(--rust);
  color: var(--paper);
  padding: 14px 0;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: var(--rule);
}
@keyframes marq { to { transform: translateX(-25%); } }
.marquee-track { display: inline-flex; animation: marq 32s linear infinite; will-change: transform; }
.marquee-group {
  display: inline-flex;
  gap: 34px;
  padding-right: 34px;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* --- Work header -------------------------------------------------------- */
/* dark strip sets the Selected Work block apart from the studio above */
.work-header {
  background: var(--espresso);
  color: var(--paper);
  padding: 64px var(--pad) 40px;
}
.work-header .eyebrow-muted { color: var(--sage); }
.work-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.work-header-text { display: flex; flex-direction: column; }
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0;
}

/* --- Project bands ------------------------------------------------------ */
.band { border-bottom: var(--rule); }
.band-sage     { background: var(--sage); border-top: var(--rule); }
.band-espresso { background: var(--espresso); color: var(--paper); }
.band-rust     { background: var(--rust); color: var(--paper); }

.band-inner {
  display: grid;
  /* two equal halves: text fills one, the screenshot bleeds to fill the other */
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: clamp(460px, 64vh, 680px);
}
.band-inner.reversed .project-text { order: 2; }
.band-inner.reversed .project-art  { order: 1; }

/* text half: padded and vertically centred against the full-bleed image */
.project-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px clamp(32px, 5vw, 92px);
}

.project-index {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 16px;
}
.project-title {
  font-family: var(--font-display);
  font-weight: 800;
  /* restrained so the longest title word fits its column at every width
     (keeps the screenshot frames equal) and reads more refined */
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.project-body { font-size: 17px; line-height: 1.6; max-width: 440px; margin: 0 0 26px; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 2px solid currentColor;
}

/* art half: screenshot inset as a card on a band-color matte */
.project-art { position: relative; display: flex; padding: 48px clamp(28px, 4vw, 64px); }

/* framed project screenshot, keyline + soft shadow on the matte */
.browser {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  background: var(--paper);
  overflow: hidden;
  border: var(--border);
  box-shadow: 0 30px 60px -30px rgba(40, 34, 29, 0.55);
}
/* keyline reads as paper against the dark bands */
.band-espresso .browser,
.band-rust .browser { border-color: var(--paper); }
.browser-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: var(--sage);
}

/* band-specific text + frame styling */
.band-sage .project-index { color: var(--espresso); opacity: 0.65; }
.band-sage .project-title { color: var(--espresso); }
.band-sage .project-body  { color: var(--ink); }

.band-espresso .project-index { color: var(--sage); }
.band-espresso .project-title { color: var(--paper); }
.band-espresso .project-body  { color: var(--cream-1); }

.band-rust .project-index { color: var(--cream-3); }
.band-rust .project-title { color: var(--paper); }
.band-rust .project-body  { color: var(--cream-2); }

/* --- Work grid (editorial project index) ------------------------------- */
.work-grid-section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 84px var(--pad) 110px;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 84px 56px;
}
.work-card {
  display: flex;
  flex-direction: column;
}

.work-card-media {
  position: relative;
  background: var(--sage);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(46, 40, 35, 0.10);
  box-shadow: 0 24px 50px -30px rgba(40, 34, 29, 0.5);
}

/* single screenshot inside each tile, with a quiet hover zoom */
.work-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.work-card:hover .work-card-media img { transform: scale(1.035); }

.work-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 28px 0 0;
}
.work-card-index {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 16px;
}
.work-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.work-card-title a {
  color: var(--espresso);
  text-decoration: none;
  transition: color 180ms ease;
}
.work-card:hover .work-card-title a,
.work-card-title a:focus-visible { color: var(--rust); }
.work-card-body-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 44ch;
  margin: 0 0 22px;
}
.work-card-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 24px;
}
.work-card-cta {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--espresso);
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  transition: color 180ms ease;
}
.work-card:hover .work-card-cta,
.work-card-cta:focus-visible { color: var(--rust); }

@media (max-width: 720px) {
  .work-grid { grid-template-columns: 1fr; gap: 56px; }
  .work-grid-section { padding: 56px var(--pad) 80px; }
}

/* --- Studio ------------------------------------------------------------- */
.studio { padding: 90px var(--pad); max-width: var(--maxw); margin: 0 auto; }
.studio-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.studio-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 5.5vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0;
}
.lead { font-size: 16px; line-height: 1.6; margin: 0 0 24px; }
.lead-muted { font-size: 16px; line-height: 1.6; margin: 0 0 34px; color: var(--muted); }

.highlights {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: var(--rule);
  border-left: var(--rule);
}
.highlights li {
  padding: 18px 18px;
  border-right: var(--rule);
  border-bottom: var(--rule);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.highlight-stat {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--rust);
}
.highlight-label {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.services { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: var(--rule); }
.services li {
  padding: 16px 0;
  border-bottom: 1px solid rgba(50, 43, 38, 0.25);
  display: flex;
  gap: 10px;
  align-items: center;
}
.bullet { color: var(--rust); }

/* --- Contact ------------------------------------------------------------ */
.contact {
  background: var(--espresso);
  color: var(--paper);
  border-top: var(--rule);
  padding: 100px var(--pad);
  text-align: center;
}
.contact-star { width: 84px; height: 84px; margin: 0 auto 30px; color: var(--rust); }
.contact-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 9vw, 128px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0 0 24px;
}
.contact-email {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--cream-1);
  margin: 0 0 46px;
}
.contact-email a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.contact-email a:hover { color: var(--rust); }

.contact-form {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
  display: grid;
  gap: 22px;
}
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cream-1);
}
.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--paper);
  background: transparent;
  border: var(--border);
  border-color: var(--paper);
  padding: 13px 14px;
  width: 100%;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--rust); }
.contact-form .btn-contact { justify-self: start; cursor: pointer; }
.contact-form .btn-contact:disabled { opacity: 0.6; cursor: progress; }

/* Honeypot, hidden from people but reachable by bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
}
.form-status.is-success { color: var(--sage); }
.form-status.is-error { color: #E8A87C; }

/* --- Footer ------------------------------------------------------------- */
.footer {
  background: var(--espresso);
  color: var(--sage);
  padding: 26px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-top: 1px solid rgba(236, 229, 213, 0.15);
}
.footer a { color: var(--sage); text-decoration: none; }
.footer a:hover { color: var(--paper); }
.footer-links { display: flex; gap: 22px; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 720px) {
  .band-inner,
  .band-inner.reversed { grid-template-columns: 1fr; min-height: 0; }
  .studio-inner { grid-template-columns: 1fr; }
  /* every card leads with the screenshot, then the text, regardless of the
     desktop reversed layout */
  .band-inner .project-art,
  .band-inner.reversed .project-art  { order: 1; }
  .band-inner .project-text,
  .band-inner.reversed .project-text { order: 2; }
  /* image flush up top, tidy gap to the text below, no large dead space */
  .project-art { height: auto; padding: 0 var(--pad); }
  .project-art .browser { height: auto; aspect-ratio: 4 / 3; }
  .project-text { padding: 28px var(--pad) 44px; }
}

/* --- Mobile header + tap targets + type (≤768px) ------------------------ */
@media (max-width: 768px) {
  /* tighten nav padding so the logo + toggle fit one line at 390px */
  .nav { padding: 14px 20px; }

  /* logo stays left on a single line */
  .wordmark { font-size: 19px; white-space: nowrap; }

  /* reveal the hamburger */
  .nav-toggle { display: flex; align-items: center; justify-content: center; }

  /* nav collapses into a slide-down panel under the sticky header */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px 20px 20px;
    background: var(--paper);
    border-bottom: var(--rule);
    box-shadow: 0 24px 40px -28px rgba(40, 34, 29, 0.55);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }
  .nav-open .nav-links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* stacked links, full-width 44px tap targets */
  .nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 15px;
    border-bottom: 1px solid rgba(50, 43, 38, 0.18);
  }
  /* the Contact action stays fully visible inside the open menu */
  .nav-links .btn-accent {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 8px;
    font-size: 14px;
  }

  /* --- Tap targets (≥44px) --- */
  .footer a,
  .contact-email a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* --- Type: lift small mono labels + footer text to ≥14px --- */
  .meta,
  .project-index,
  .field label { font-size: 14px; }
  .tag { font-size: 14px; }
  .footer { font-size: 14px; }
}

/* --- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .star, .marquee-track { animation: none !important; }
  html { scroll-behavior: auto; }
}
