/* ============================================================
   Mirsh Systems — modern minimalist editorial
   ============================================================ */
:root {
  color-scheme: light;

  --paper: #f6f3ec;
  --paper-2: #efe9dd;
  --cream: #fffcf6;
  --ink: #1a1814;
  --ink-soft: #3c382f;
  --muted: #6c6458;
  --line: rgba(26, 24, 20, 0.11);
  --line-strong: rgba(26, 24, 20, 0.2);
  --clay: #bf7a3f;
  --clay-dark: #8a5429;
  --night: #14120e;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-height: 78px;
  --radius: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: Fraunces, ui-serif, Georgia, "Times New Roman", serif;

  font-family: var(--font-sans);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--clay); color: #fff; }

/* keep coloured section-bands full-bleed while centring content to --maxw */
.constrain,
section:not(.hero),
.site-header,
.site-footer {
  padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2));
}

/* ----------------------------------------------------------------
   Typography
   ---------------------------------------------------------------- */
h1, h2, h3 { margin: 0; font-weight: 500; }

h1 {
  margin-bottom: 22px;
  font-family: var(--font-serif);
  font-size: clamp(2.9rem, 6.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 20px;
  font-family: var(--font-serif);
  font-size: clamp(1.95rem, 3.8vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 10px;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin-top: 0; }

.eyebrow,
.section-kicker p,
.section-kicker span {
  margin: 0;
  color: var(--clay-dark);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* ----------------------------------------------------------------
   Header
   ---------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--ink);
  transition: background 360ms var(--ease), color 360ms var(--ease), border-color 360ms var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.nav-active {
  background: rgba(246, 243, 236, 0.82);
  color: var(--ink);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(1.3);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand-logo {
  width: auto;
  height: 30px;
  max-width: 168px;
  transition: opacity 200ms var(--ease);
}
.brand:hover .brand-logo { opacity: 0.78; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 34px);
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
  opacity: 0.84;
  transition: opacity 200ms var(--ease);
}
.site-nav a:hover,
.site-nav a:focus-visible { opacity: 1; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease);
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid currentColor;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.6px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 200ms var(--ease);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.3px) rotate(-45deg); }

/* ----------------------------------------------------------------
   Hero
   ---------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(58% 56% at 74% 46%, rgba(191, 122, 63, 0.12), transparent 70%),
    radial-gradient(40% 40% at 18% 86%, rgba(191, 122, 63, 0.06), transparent 70%),
    var(--paper);
}

.hero-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: calc(var(--header-height) + 3vh) var(--gutter) 8vh;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.hero-content {
  max-width: 620px;
  color: var(--ink);
}
.hero .eyebrow { color: var(--clay-dark); }
.hero h1 { margin-top: 18px; }

.hero-line {
  max-width: 52ch;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-visual {
  position: relative;
  height: min(72vh, 600px);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
}
.scroll-cue-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--clay), transparent);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: scaleY(0.3); transform-origin: top; opacity: 0.3; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(0.3); transform-origin: bottom; opacity: 0.3; }
}

/* ----------------------------------------------------------------
   Buttons & links
   ---------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  transition: background 220ms var(--ease), color 220ms var(--ease),
    border-color 220ms var(--ease), transform 220ms var(--ease), box-shadow 220ms var(--ease);
}
.button:hover, .button:focus-visible { transform: translateY(-2px); }

.button-primary {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 14px 30px -16px rgba(191, 122, 63, 0.8);
}
.button-primary:hover, .button-primary:focus-visible {
  background: #cb854a;
  box-shadow: 0 20px 38px -16px rgba(191, 122, 63, 0.85);
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
}
.button-secondary:hover, .button-secondary:focus-visible {
  border-color: var(--ink);
  background: rgba(26, 24, 20, 0.04);
}

/* ----------------------------------------------------------------
   Section rhythm
   ---------------------------------------------------------------- */
section:not(.hero) { padding-block: clamp(80px, 11vw, 138px); }

.intro,
.method,
.contact {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  display: grid;
  align-content: start;
  gap: 12px;
}
.section-kicker span { color: var(--clay); }

.intro-copy { max-width: 60ch; }
.intro-copy p,
.work-copy p,
.service-header p,
.contact-copy p,
.steps p,
.principles p,
.service-list p {
  color: var(--muted);
  font-size: 1.06rem;
}

/* ---- principles ---- */
.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding-top: 0;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.principles article {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: clamp(28px, 3vw, 42px);
  background: var(--paper);
  transition: background 280ms var(--ease);
}
.principles article:hover { background: var(--cream); }
.principles span,
.service-list span,
.steps span {
  display: block;
  color: var(--clay);
  font-size: 0.8rem;
  font-weight: 600;
}
.principles span { margin-bottom: auto; }
.principles h3 { margin-top: 40px; }

/* ---- work ---- */
.work {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 76px);
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.work-media {
  min-height: 560px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-2);
}
.work-media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  filter: saturate(0.85);
  transition: transform 1.1s var(--ease);
}
.work-media:hover img { transform: scale(1.035); }
.work-copy { max-width: 600px; }
.work-copy .section-kicker { gap: 0; margin-bottom: 14px; }

.plain-list {
  display: grid;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.plain-list li {
  padding: 15px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}
.plain-list li:last-child { border-bottom: 1px solid var(--line); }

/* ---- services ---- */
.services {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.service-header {
  max-width: 620px;
  margin: 20px 0 clamp(40px, 5vw, 60px) calc(220px + clamp(32px, 5vw, 64px));
}
.service-list { border-top: 1px solid var(--line-strong); }
.service-list article {
  display: grid;
  grid-template-columns: 84px minmax(170px, 0.34fr) minmax(0, 1fr);
  gap: 34px;
  align-items: baseline;
  padding: clamp(26px, 3vw, 34px) 16px;
  margin-inline: -16px;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
  transition: background 260ms var(--ease);
}
.service-list article:hover { background: rgba(191, 122, 63, 0.06); }
.service-list span { margin-bottom: 0; }
.service-list h3,
.service-list p { margin-bottom: 0; }
.service-list h3 { transition: color 220ms var(--ease); }
.service-list article:hover h3 { color: var(--clay-dark); }

/* ---- method ---- */
.method { background: var(--paper-2); }
.method-copy { grid-column: 2; }
.steps {
  grid-column: 2;
  display: grid;
  gap: 1px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.steps li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 30px;
  padding: clamp(26px, 3vw, 34px);
  background: var(--paper-2);
  transition: background 260ms var(--ease);
}
.steps li:hover { background: var(--cream); }
.steps span { grid-row: 1 / span 2; margin-bottom: 0; font-size: 1rem; font-family: var(--font-serif); }
.steps h3, .steps p { grid-column: 2; }
.steps h3 { margin-bottom: 5px; }

/* ----------------------------------------------------------------
   Contact — proper two-column
   ---------------------------------------------------------------- */
.contact {
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.contact-copy,
.contact-form { grid-column: auto; }

.contact-copy .section-kicker { gap: 0; margin-bottom: 14px; }

.direct-mail {
  display: inline-block;
  margin-top: 22px;
  padding-bottom: 3px;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  transition: color 220ms var(--ease), border-color 220ms var(--ease);
}
.direct-mail:hover { color: var(--clay-dark); border-color: var(--clay); }

.company-details {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.company-details dl { display: grid; gap: 18px; margin: 0; }
.company-details div {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 20px;
}
.company-details dt {
  color: var(--clay-dark);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.company-details dd { margin: 0; color: var(--ink-soft); }

.contact-form {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: clamp(26px, 3vw, 38px);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -45px rgba(26, 24, 20, 0.5);
}
.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.6);
  padding: 13px 14px;
  outline: none;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms var(--ease);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--clay);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(191, 122, 63, 0.13);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .button { margin-top: 4px; }
.form-status {
  min-height: 22px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--clay-dark);
}

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-block: 36px;
  background: var(--night);
  color: rgba(255, 255, 255, 0.72);
}
.site-footer .brand-logo { height: 30px; }
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 22px;
  font-size: 0.9rem;
}
.footer-meta a:hover { color: #e6a35c; }

/* ----------------------------------------------------------------
   Reveal
   ---------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */
@media (max-width: 980px) {
  :root { --header-height: 66px; }

  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: var(--header-height) 12px auto;
    display: grid;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(246, 243, 236, 0.97);
    color: var(--ink);
    backdrop-filter: blur(18px);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 180ms;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav a { min-height: 48px; display: flex; align-items: center; padding: 0 12px; opacity: 1; }
  .site-nav a::after { display: none; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: clamp(20px, 5vw, 36px);
    padding-bottom: 12vh;
  }
  .hero-content { max-width: none; }
  .hero-visual { order: -1; height: min(46vh, 380px); }

  .intro, .method, .contact, .work { grid-template-columns: 1fr; gap: 30px; }
  .method-copy, .steps, .contact-copy, .contact-form { grid-column: auto; }
  .service-header { margin-left: 0; }
  .work-media { order: -1; min-height: 340px; }
  .principles { grid-template-columns: 1fr; }
  .principles article { min-height: 0; }
  .principles h3 { margin-top: 24px; }
  .service-list article { grid-template-columns: 60px minmax(0, 1fr); gap: 8px 18px; }
  .service-list p { grid-column: 2; margin-top: 8px; }
  .steps li { grid-template-columns: 56px minmax(0, 1fr); gap: 18px; }

  .site-footer { flex-direction: column; align-items: flex-start; }
  .footer-meta { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .hero-actions .button { width: 100%; }
  .company-details div { grid-template-columns: 1fr; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
