/* === Mokimo — Homepage Styles (styles/pages/home.css) ===
   Homepage-only sections: hero, capabilities, case evidence, approach,
   profile, and the interactive scoping brief form. Shared scaffolding
   (sections, buttons, badges, cards) lives in core.css. */

/* --- 1. Hero Section --- */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-copy .badge { margin-bottom: 1.5rem; }
.hero-title {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  line-height: 1.6;
  max-width: 42rem;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-bullets {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* Hero lead photo: the case-card postcard treatment (white paper, typed
   caption strip, drawing pins) reused via the .case-print classes, at full
   hero-column scale. Deliberately straight — no JS tilt scatter and no
   hover bend — and without the case cards' 1.43 zoom.
   The box is layout-defined: the figure's 6:5 aspect (border-box, strip
   included) fixes the footprint from the column width alone, so candidate
   images can be swapped in freely — any intrinsic size/aspect fills the
   same box via object-fit and cannot shift the layout. */
.case-print.hero-print {
  height: auto;
  aspect-ratio: 6 / 6;
}
.case-print.hero-print img {
  /* Zoom via layout size (a 110% box clipped by the window) rather than
     transform: scale() — composited transform scaling resamples the
     already-rasterized photo with bilinear filtering, which shimmers/
     aliases on fine detail (the cutting-mat grid). Layout-size zoom keeps
     the browser's high-quality image resampling. */
  position: absolute;
  inset: -5%;
  width: 110%;
  height: 110%;
  transform: none;
  object-position: 30% 90%;
}
/* Opt the hero print out of the case-card hover bend; keep the resting
   shadow (same values as .case-print) so nothing lifts on hover. */
.case-print.hero-print:hover {
  transform: none;
  box-shadow:
    0 1px 2px rgba(12, 13, 14, 0.2),
    0 6px 14px rgba(12, 13, 14, 0.16);
}

/* --- 2. Capabilities Pillars --- */
.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.pillar-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}
.pillar-num { font-family: var(--font-mono); font-size: 1.5rem; }
.pillar-cat {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.pillar-title { font-size: 1.25rem; margin-bottom: 0.75rem; }
.pillar-desc { font-size: 0.875rem; line-height: 1.6; margin-bottom: 0.5rem; }
/* List set in the sans (matching .pillar-desc) for readability; mono stays
   reserved for labels like the OUTPUT strip. Markers are drawn in CSS so
   wrapped lines hang under the text, not under the bullet. */
.pillar-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}
.pillar-list li {
  position: relative;
  padding-left: 1.1rem;
}
.pillar-list li::before {
  content: "•";
  position: absolute;
  left: 0;
}
/* Card footer: an empty rule near the card bottom, as a visual finish only.
   The flex space-between on .pillar-card pins it to the bottom, so the rule
   sits at a consistent height across the row. */
.pillar-output {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

/* --- 3. Selected Work --- */
.case-carousel {
  position: relative; /* containing block for the wide-screen breakout buttons */
  display: flex;
  flex-direction: column;
}
/* Nav row wraps underneath the cards: prev left, counter centre, next
   right. The buttons reuse .btn/.btn--secondary for the standard look and
   press-in hover; .case-nav only resizes them. */
.case-nav-row {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}
.case-nav { flex: none; width: 4.75rem; height: 2.75rem; padding: 0; }
.case-counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* Wide screens: the buttons break out into the page margin, flanking the
   cards. Vertical centring uses margin rather than transform so .btn:hover's
   press-in translate applies untouched. */
@media (min-width: 1400px) {
  .case-carousel { display: block; }
  .case-nav-row { display: contents; }
  .case-nav {
    position: absolute;
    top: 50%;
    margin-top: -2.25rem; /* half the 4.5rem height set at the 768px block */
  }
  #case-prev { left: -4.5rem; }
  #case-next { right: -4.5rem; }
}
.case-counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.case-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
/* The case-card component itself (card, print, tags, footer, whole-card
   link) lives in core.css — shared with the work hub. What follows is
   carousel-only. */

/* Mechanical step: the frame lurches in the travel direction (with a
   slight ratchet tilt), holds while the cards swap (see the JS timer),
   then springs back with a damped reverb rather than a flat step.
   Mirrored for prev/next. */
@keyframes case-step-fwd {
  0%   { transform: translateX(1px);}
  100%   { transform: translateX(0px);}


}
@keyframes case-step-back {
	0%   { transform: translateX(0px);}
  	100%   { transform: translateX(0px);}
}


.case-grid.is-stepping-fwd  { animation: case-step-fwd 0.25s; }
.case-grid.is-stepping-back { animation: case-step-back 0.25s; }
@media (prefers-reduced-motion: reduce) {
  .case-grid.is-stepping-fwd,
  .case-grid.is-stepping-back { animation: none; }
}

/* --- 4. Approach Timeline --- */
.approach-intro { max-width: 48rem; margin-bottom: 3.5rem; }
.approach-intro p { font-size: clamp(1rem, 2vw, 1.125rem); line-height: 1.6; margin-top: 1rem; }
.approach-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.step-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.step-header {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
}
.step-title { font-size: 1.125rem; margin-bottom: 0.5rem; }
.step-desc { font-size: 0.8125rem; line-height: 1.6; }
.step-output {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
}

/* --- 5. About Foundry --- */
.about-intro { max-width: 42rem; margin-bottom: 3rem; }
.about-intro p { font-size: 1rem; line-height: 1.6; margin-top: 1rem; }
/* Team row: story tile first, then the profile cards. Grid stretch keeps
   every cell the same height; the profile cards are deliberately narrow so
   the story page keeps the visual weight (story | Tom | Luke). */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
/* Story tile: the whole card is the link to /story/. Same parchment card as
   the profile cards — its larger footprint is what sets it apart. Hover
   presses the card into its shadow, matching the .btn press-in treatment. */
.story-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
/* Press-in mirrors .btn:hover/:active — translate toward the shadow and
   collapse it. :active covers touch feedback; hover-only styles stay gated
   behind (hover: hover). */
.story-card:active { transform: translate(2px, 2px); box-shadow: none; }
@media (hover: hover) {
  .story-card:hover { transform: translate(2px, 2px); box-shadow: none; }
}
.story-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.story-card__title { font-size: 1.5rem; font-weight: 700; line-height: 1.15; margin-top: 0.5rem; }
.story-card__cta {
  align-self: stretch;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}
@media (hover: hover) {
  .story-card:hover .story-card__cta { text-decoration: underline; }
}
a.story-card:focus-visible {
  outline: 2px solid var(--border-dark);
  outline-offset: 3px;
}
/* Card--interactive's lift is intentionally not used here: the press-in
   above replaces it, so the tile behaves like a button, not a hoverable card. */
.profile-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.profile-name { font-size: 1.5rem; }
.profile-role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  display: block;
  margin-top: 0.25rem;
}
.profile-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.profile-link { font-weight: 700; }
.profile-link:hover { text-decoration: underline; }

/* --- 6. Contact & Project Scoping Brief --- */
.contact-panel {
  padding: 1.5rem;
  box-shadow: var(--shadow-brutal-lg);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.contact-intro { font-size: clamp(0.875rem, 2vw, 1rem); line-height: 1.6; margin: 1rem 0 2rem; }
.contact-blocks { display: flex; flex-direction: column; gap: 1rem; font-family: var(--font-mono); font-size: 0.75rem; }
.contact-block {
  border: 1px solid var(--border-dark);
  background-color: var(--parchment);
  padding: 0.875rem;
  box-shadow: var(--shadow-brutal-sm);
}
.contact-block__label {
  text-transform: uppercase;
  font-size: 0.625rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.25rem;
}
.contact-block__val { font-weight: 700; font-size: 0.875rem; }
.contact-block__val:hover { text-decoration: underline; }
.contact-block__text { font-weight: 500; line-height: 1.4; }
.contact-legal {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.contact-form-card { padding: 1.5rem; }
.contact-form-header {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.contact-form-header .stage { color: var(--muted); }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.375rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1px solid var(--border-dark);
  background-color: var(--surface);
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink);
  transition: background-color var(--transition), border-color var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  background-color: var(--parchment);
  border-color: var(--ink);
}
/* Chrome/Edge/Safari paint autofilled inputs a fixed light blue and ignore
   plain background-color on :-webkit-autofill; an inset shadow repaints
   them in the site's own surface colour instead. */
.form-input:-webkit-autofill,
.form-select:-webkit-autofill,
.form-textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
}
.form-input:focus:-webkit-autofill,
.form-select:focus:-webkit-autofill,
.form-textarea:focus:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--parchment) inset;
}
.form-footnote {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  padding-top: 0.5rem;
}
.form-success {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-dark);
  background-color: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.form-success__title {
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.form-success__dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background-color: var(--ink); }
.form-error {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-dark);
  background-color: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.form-error__title {
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* Hollow dot distinguishes the error banner from the solid success dot
   without breaking the monochrome palette. */
.form-error__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  border: 2px solid var(--ink);
}
.form-error__detail { margin-top: 0.5rem; color: var(--muted); }
/* Honeypot: off-screen rather than display:none, so naive spam scripts that
   skip display:none fields still trip over it; real users can't reach it. */
.form-hp {
  position: absolute;
  left: -5000px;
  top: -5000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- 7. Responsive Layout Breakpoints --- */
@media (min-width: 640px) {
  .pillar-card, .case-card, .profile-card, .story-card, .contact-form-card { padding: 2rem; }
  .contact-panel { padding: 3rem; }
  .approach-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .pillars-grid { grid-template-columns: repeat(3, 1fr); }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .case-nav { width: 3.25rem; height: 4.5rem; }
}

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 7fr 5fr; gap: 2rem; }
  .approach-grid { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: 5fr 7fr; }
  .about-grid { grid-template-columns: 2fr 1fr 1fr; }
}
