/* ===================================================================
   Mesa — Roy Thronson portfolio
   Hand-written. No framework, no build step, no page builder.
   Palette sampled from the Del Sol logo and Monument Valley at dusk.
   =================================================================== */

:root {
  /* strata — bone through stone to clay */
  --paper:      #FDFBF6;
  --sand:       #F1ECE2;
  --stone:      #E7E4DB;
  --sand-deep:  #E6DFD1;
  --rule:       #CFC5B3;

  /* ink — all brown, no neutral black anywhere */
  --ink:        #2A2018;
  --ink-soft:   #51443A;
  --ink-faint:  #63594E;

  /* earth */
  --gold:       #9C7E14;   /* decorative only */
  --gold-text:  #7A6210;
  --rust:       #99462B;
  --rust-deep:  #7D3821;
  --juniper:    #44563F;
  --juniper-deep:#36432F;
  --sage:       #4F5C46;
  --stone-deep: #5E594F;
  --bark:       #4A3728;
  --bark-deep:  #3B2C20;

  --radius:     3px;
  --radius-lg:  10px;
  --measure:    64ch;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--rust); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rust-deep); }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--juniper); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0 0 .6rem;
  color: var(--ink);
}

p { margin: 0 0 1.1rem; max-width: var(--measure); }

.wrap { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 3rem)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: .8rem 1.2rem;
}
.skip:focus { left: 0; }

/* ---------- strata rule: the thin canyon-layer divider ---------- */
.strata { height: 7px; display: flex; }
.strata span { flex: 1; }
.strata span:nth-child(1) { background: var(--rust); }
.strata span:nth-child(2) { background: var(--gold); flex: 2; }
.strata span:nth-child(3) { background: var(--juniper); }
.strata span:nth-child(4) { background: var(--stone-deep); flex: .6; }

/* ---------- header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: #333333;
  border-bottom: 1px solid #262626;
}
.masthead .bar {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 70px; padding-block: .6rem;
}
.masthead img { width: 190px; }
.masthead nav { margin-left: auto; }
.masthead nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.masthead nav a {
  font-size: .92rem; font-weight: 500; color: #F2F2F2;
  text-decoration: none; letter-spacing: .01em;
}
.masthead nav a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }
/* the CTA is a button first — the nav link colour must not win here */
.masthead nav a.btn-primary { color: #fff; }
.masthead nav a.btn-primary:hover { color: #fff; text-decoration: none; }
.masthead nav a.btn-ghost { color: #F2F2F2; border-color: #F2F2F2; }
/* the focus ring needs to read against the dark bar, not the page */
.masthead a:focus-visible { outline-color: #E8C572; }

.btn {
  display: inline-block; font-family: var(--body); font-weight: 600;
  font-size: .95rem; letter-spacing: .01em; text-decoration: none;
  padding: .72rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  cursor: pointer;
}
.btn-primary { background: var(--rust); color: #fff; }
.btn-primary:hover { background: var(--rust-deep); color: #fff; }
.btn-ghost { border-color: var(--ink-soft); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--rust); color: var(--rust); }
.btn-light { border-color: rgba(255,255,255,.9); color: #fff; background: rgba(255,255,255,.07); }
.btn-light:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-lg { padding: .85rem 1.9rem; font-size: 1rem; }

/* ---------- hero: full-bleed Monument Valley ---------- */
.hero {
  position: relative;
  min-height: clamp(540px, 74vh, 760px);
  display: flex; align-items: center;
  background: var(--bark);
  overflow: hidden;
}
.hero .shot { position: absolute; inset: 0; }
.hero .shot img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
/* warm scrim — heaviest where the type sits, clearing toward the light */
.hero .shot::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(30,22,16,.94) 0%, rgba(34,26,19,.90) 46%,
                            rgba(48,58,42,.62) 72%, rgba(74,55,40,.38) 100%),
    linear-gradient(to top, rgba(34,25,18,.55) 0%, rgba(34,25,18,0) 42%);
}
.hero .grid { position: relative; padding: clamp(3rem, 7vw, 5rem) 0; }
.hero .copy { max-width: 46rem; }

.eyebrow {
  font-family: var(--body); font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: #E8C572;
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 3.4rem);
  letter-spacing: -0.028em; margin-bottom: .55rem; color: #FFFFFF;
  text-shadow: 0 2px 18px rgba(25,18,13,.6);
}
.hero .role {
  font-family: var(--body); font-size: clamp(1.02rem, 1.7vw, 1.2rem);
  color: #F0E7D9; font-weight: 500; margin-bottom: 1.6rem;
  max-width: none; white-space: nowrap;
  text-shadow: 0 1px 12px rgba(25,18,13,.65);
}
.hero .pitch {
  font-size: clamp(1.04rem, 1.5vw, 1.18rem); color: #F2E8D8;
  border-left: 3px solid #E8C572; padding-left: 1.2rem; max-width: 48ch;
  text-shadow: 0 1px 12px rgba(25,18,13,.7);
}
.hero .pitch strong { color: #FFFFFF; font-weight: 600; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* ---------- section shell ---------- */
.band { padding: clamp(3.2rem, 7vw, 5.5rem) 0; }
.band-sand  { background: var(--sand); }
.band-paper { background: var(--paper); }
.band-deep  { background: var(--sand-deep); }
.band-stone { background: var(--stone); }

.band-head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 60ch; }
.band-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.band-head p { color: var(--ink-soft); margin-bottom: 0; }

/* ---------- 01 / 02 / 03 practice columns ---------- */
.practice { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.6rem, 3vw, 2.6rem); }
.practice article { position: relative; padding-top: 2.6rem; border-top: 2px solid var(--ink); }
.practice .num {
  position: absolute; top: -.2rem; left: 0;
  font-family: var(--display); font-size: 1.05rem; font-weight: 700;
  color: var(--rust); letter-spacing: .04em;
}
.practice h3 { font-size: 1.32rem; margin-bottom: .7rem; }
.practice p { font-size: .97rem; color: var(--ink-soft); }
.practice .more {
  font-size: .9rem; font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; gap: .4rem;
}
.practice .more::after { content: "\2192"; transition: transform .18s ease; }
.practice .more:hover::after { transform: translateX(3px); }

/* ---------- about: portrait + condensed bio ---------- */
.about { display: grid; grid-template-columns: 300px 1fr; gap: clamp(2rem, 4vw, 3.4rem); align-items: start; }
.portrait {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 6px solid var(--paper); box-shadow: 0 18px 38px -20px rgba(46,33,24,.5);
}
.about p { font-size: 1.03rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; padding: 0; list-style: none; }
.chips li {
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  background: var(--sand-deep); color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: 999px; padding: .34rem .85rem;
}

/* ---------- work grid ---------- */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.4rem, 2.6vw, 2rem); }
/* Cards carry two explicit links — the title and a "View case study" line.
   Deliberately NOT a whole-card hotspot: on touch, a tap that begins as a
   scroll over a full-card target can fire the link instead of scrolling. */
.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .2s ease, border-color .2s ease;
}
/* no translate lift: the card itself is not a target, so it should not
   behave like one. The border and shadow still answer the pointer. */
.card:hover { box-shadow: 0 16px 30px -24px rgba(42,32,24,.45); }

.card h3 a {
  color: var(--ink); text-decoration: none; text-underline-offset: 3px;
}
.card h3 a:hover,
.card h3 a:focus-visible {
  color: var(--rust); text-decoration: underline;
  text-decoration-color: currentColor; text-decoration-thickness: 2px;
}

.card .go {
  margin-top: auto; padding-top: .95rem;
  font-size: .92rem; font-weight: 600; color: var(--juniper);
  display: inline-flex; align-items: center; gap: .4rem;
  text-decoration: none; align-self: flex-start;
  transition: color .18s ease;
}
.card .go:hover,
.card .go:focus-visible { color: var(--rust); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.card .go::after { content: "\2192"; transition: transform .18s ease; }
.card .go:hover::after { transform: translateX(4px); }

/* visually hidden, still announced — keeps each "View case study" unique */
.vh {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.card .body { padding: 1.15rem 1.25rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card .kicker {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rust); margin-bottom: .45rem;
}
.card h3 { font-size: 1.16rem; margin-bottom: .5rem; }
.card p { font-size: .93rem; color: var(--ink-soft); margin-bottom: 0; }
.card .live { margin-top: .9rem; }
.card .live {
  margin-top: .9rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--sage);
}

/* ---------- how I work ---------- */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.6rem, 3vw, 2.6rem); }
.ways h3 { font-size: 1.22rem; margin-bottom: .6rem; }
.ways p { font-size: .96rem; color: var(--ink-soft); }
.ways .mark { width: 34px; height: 3px; background: var(--juniper); margin-bottom: 1rem; }

/* ---------- capability lists ---------- */
.caps { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3.4rem); }
.caps h3 { font-size: 1.12rem; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--rule); }
.caps ul { list-style: none; margin: 0; padding: 0; }
.caps li {
  position: relative; padding-left: 1.4rem; margin-bottom: .62rem;
  font-size: .97rem; color: var(--ink-soft);
}
.caps li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; background: var(--juniper); border-radius: 50%;
}
.caps li strong { color: var(--ink); font-weight: 600; }

/* ---------- credentials ---------- */
.creds { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.4rem, 2.6vw, 2rem); }
.cred {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 4px solid var(--juniper); border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem; display: flex; flex-direction: column;
}
.cred .yr { font-size: .78rem; font-weight: 700; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: .3rem; }
.cred h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.cred p { font-size: .93rem; color: var(--ink-soft); flex: 1; }
.cred .btn { align-self: flex-start; margin-top: .6rem; }

/* ---------- the meta section: canyon rust, never black ---------- */
.meta { background: var(--bark); color: #FBF4E8; }
.meta h2 { color: #FFFFFF; }
.meta p { color: #F2E8D8; max-width: 62ch; }
.meta strong { color: #E8C572; font-weight: 600; }
.meta a { color: #E8C572; }
.meta a:hover { color: #FFFFFF; }
.meta ul.checks { list-style: none; margin: 1.4rem 0 0; padding: 0; max-width: 62ch; }
.meta ul.checks li {
  position: relative; padding-left: 1.6rem; margin-bottom: .7rem;
  color: #F2E8D8; font-size: .98rem;
}
.meta ul.checks li::before {
  content: "\2713"; position: absolute; left: 0; top: 0;
  color: #E8C572; font-weight: 700;
}
.meta code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86em; background: rgba(255,255,255,.16); padding: .14em .45em;
  border-radius: 3px; color: #FFFFFF;
}
.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 2.4rem; padding: 0; list-style: none; }
.specs li { border-top: 2px solid #E8C572; padding-top: .9rem; }
.specs b { display: block; font-family: var(--display); font-size: 1.55rem; color: #FFFFFF; margin-bottom: .2rem; }
.specs span { font-size: .86rem; color: #D5CABA; }

/* ---------- footer ---------- */
.foot { background: var(--sand-deep); padding: 3rem 0 2.4rem; border-top: 1px solid var(--rule); }
.foot .row { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.foot img { width: 160px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.foot a { font-size: .93rem; }
.foot .fine { margin: 1.8rem 0 0; font-size: .85rem; color: var(--ink-faint); }

/* ---------- contact page ---------- */
.form-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: .35rem; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: .72rem .85rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 3px solid var(--juniper); outline-offset: 1px; border-color: var(--juniper);
}
.field textarea { min-height: 170px; resize: vertical; }
.hint { font-size: .84rem; color: var(--ink-faint); margin-top: .3rem; }
.aside-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 4px solid var(--juniper); border-radius: var(--radius-lg); padding: 1.6rem 1.7rem;
}
.aside-card h2 { font-size: 1.3rem; }
.aside-card dl { margin: 1.2rem 0 0; }
.aside-card dt { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 1rem; }
.aside-card dd { margin: .15rem 0 0; font-size: .98rem; }

/* ---------- responsive ---------- */

/* The diagonal scrim clears toward the sun, which is fine on a wide screen
   where the copy stays left. Below ~1200px the text reaches the bright side,
   so the hero switches to an even wash to keep the type above AA. */
@media (max-width: 1199.98px) {
  .hero .shot::after {
    background:
      linear-gradient(180deg, rgba(28,21,15,.86) 0%, rgba(28,21,15,.80) 55%, rgba(34,26,19,.88) 100%),
      linear-gradient(to top, rgba(28,21,15,.45) 0%, rgba(28,21,15,0) 45%); }
}

@media (max-width: 980px) {
  .hero { min-height: clamp(460px, 68vh, 600px); }
  .hero .shot img { object-position: center 58%; }
  .hero .role, .hero .pitch { max-width: none; }
  .hero .role { white-space: normal; }
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 260px; }
  .practice, .work, .ways, .creds { grid-template-columns: repeat(2, 1fr); }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  html { scroll-padding-top: 74px; }
  .wrap, .narrow { width: calc(100% - 2.2rem); }
  /* a one-pager navigates by scrolling; on a phone the masthead keeps
     only the two jumps worth having and loses the rest to the content */
  .masthead .bar { min-height: 56px; gap: .7rem; }
  .masthead img { width: 142px; }
  .masthead nav ul { gap: 1rem; flex-wrap: nowrap; }
  .masthead nav a { font-size: .88rem; white-space: nowrap; }
  .masthead .nav-wide { display: none; }
  /* logo + one CTA only; the button shrinks to match the shorter bar */
  .masthead .nav-cta .btn { padding: .42rem .9rem; font-size: .8rem; border-width: 1px; }
  .practice, .work, .ways, .creds, .caps, .specs { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.7rem); }
  .band { padding: 2.6rem 0; }
  .portrait { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover { transform: none; }
}

/* ===================================================================
   Case study pages
   =================================================================== */

.cs-hero { position: relative; background: var(--sand-deep); overflow: hidden; }
.cs-hero .shot { position: absolute; inset: 0; }
.cs-hero .shot img { width: 100%; height: 100%; object-fit: cover; }
.cs-hero .shot::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(104deg, rgba(42,32,24,.94) 0%, rgba(54,67,47,.86) 44%, rgba(156,126,20,.46) 100%);
}
.cs-hero .inner { position: relative; padding: clamp(3rem, 7vw, 5.4rem) 0; }
.cs-hero .eyebrow { color: #E8C572; }
.cs-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 20ch; }
.cs-hero .sub { color: #F2E8D8; font-size: clamp(1.02rem, 1.6vw, 1.18rem); max-width: 52ch; margin-bottom: 0; }
.cs-hero .cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }

.crumbs { font-size: .86rem; margin: 0 0 1rem; color: #D5CABA; }
.crumbs a { color: #E8C572; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span { opacity: .7; margin: 0 .45rem; }

.cs-body { width: min(820px, calc(100% - 3rem)); margin-inline: auto; }
.cs-body h3 { font-size: 1.28rem; margin: 2.1rem 0 .7rem; }
.cs-body h3:first-child { margin-top: 0; }
.cs-body p { font-size: 1.04rem; color: var(--ink-soft); max-width: none; }
.cs-body p strong, .cs-body li strong { color: var(--ink); font-weight: 600; }
.cs-body ul { list-style: none; margin: 0 0 1.3rem; padding: 0; }
.cs-body ul li {
  position: relative; padding-left: 1.5rem; margin-bottom: .6rem;
  font-size: 1.01rem; color: var(--ink-soft);
}
.cs-body ul li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; background: var(--juniper); border-radius: 50%;
}
.cs-body ol { padding-left: 1.3rem; margin-bottom: 1.3rem; color: var(--ink-soft); }
.cs-body ol li { margin-bottom: .55rem; font-size: 1.01rem; }

.cs-callout {
  background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--juniper);
  border-radius: var(--radius-lg); padding: 1.35rem 1.6rem; margin: 0 0 2rem;
}
.cs-callout p { margin-bottom: 0; }
.cs-callout p + p { margin-top: .8rem; }

.cs-fig { margin: 1.9rem 0; }
.cs-fig img {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--rule); background: var(--paper);
}
.cs-fig figcaption { margin-top: .7rem; font-size: .92rem; color: var(--ink-faint); }
.cs-fig figcaption b { display: block; color: var(--ink); font-weight: 600; margin-bottom: .15rem; }

.cs-video { margin: 1.9rem 0; }
.cs-video video {
  width: 100%; display: block; border-radius: var(--radius-lg);
  border: 1px solid var(--rule); background: #000;
}
.cs-video figcaption { margin-top: .7rem; font-size: .92rem; color: var(--ink-faint); }
/* fallback text shown only when the browser cannot play the file */
.cs-video video { color: #F2E8D8; }
.cs-video video a { color: #E8C572; }

.cs-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 0; }

.cs-next { background: var(--sand-deep); border-top: 1px solid var(--rule); padding: 2.6rem 0; }
.cs-next .row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.cs-next p { margin: 0; color: var(--ink-soft); }

@media (max-width: 680px) {
  .cs-body { width: calc(100% - 2.2rem); }
  .cs-hero h1 { font-size: clamp(1.8rem, 8vw, 2.3rem); }
}
