/* ─────────────────────────────────────────────────────────────
   uxwithstef portfolio — site stylesheet
   Built on the Torc Assist token sheet (assets/css/tokens.css).
   Brand layer below adds the portfolio's own palette, which sits
   on top of the product tokens rather than replacing them.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Portfolio brand palette */
  --accent:          #0B3948;  /* deep teal, primary accent */
  --accent-mid:      #1B8CB1;  /* link hover */
  --accent-deep:     #051C23;  /* dark section ground */
  --secondary:       #E27C5A;  /* coral, secondary accent */
  --secondary-light: #E8BEB0;
  --secondary-deep:  #A33814;

  --page-bg:   #F9FAFA;
  --ink:       #2F3537;
  --ink-muted: #596569;

  /* Alpha derivations, so tints stay consistent everywhere */
  --accent-a05: rgba(11, 57, 72, 0.05);
  --accent-a08: rgba(11, 57, 72, 0.08);
  --accent-a15: rgba(10, 52, 66, 0.15);
  --accent-a18: rgba(11, 57, 72, 0.18);
  --secondary-a08: rgba(226, 124, 90, 0.08);
  --secondary-a30: rgba(226, 124, 90, 0.30);
  --mid-a08: rgba(27, 140, 177, 0.08);
  --mid-a30: rgba(27, 140, 177, 0.30);

  /* Layout */
  --measure-wide:  1080px;
  --measure:       900px;
  --measure-tight: 640px;
  --gutter: 48px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: var(--fw-medium); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-mid); text-decoration: underline; }

img { max-width: 100%; }

::selection { background: var(--secondary-light); }

:focus-visible {
  outline: 2px solid var(--accent-mid);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--page-bg);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-md) 0;
  font-size: 14px;
  font-weight: var(--fw-medium);
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ── Header ─────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--accent);
  border-bottom: 1px solid var(--accent-a18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
}

.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand:hover { text-decoration: none; }
.brand__name { font-size: 16px; font-weight: var(--fw-medium); color: var(--page-bg); }
.brand__role { font-size: 12px; color: rgba(249, 250, 250, 0.7); }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a { color: var(--page-bg); font-size: 14px; font-weight: var(--fw-medium); }
.nav a:hover { color: var(--secondary-light); }

.crumbs { font-size: 14px; color: rgba(249, 250, 250, 0.7); }
.crumbs a, .crumbs span { color: var(--page-bg); }

.banner {
  background: var(--accent-a08);
  color: var(--accent);
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: var(--fw-medium);
}

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: var(--fw-medium);
  transition: background-color 120ms ease, color 120ms ease;
}
.btn:hover { text-decoration: none; }

.btn--primary { background: var(--accent); color: var(--page-bg); }
.btn--primary:hover { background: var(--accent-mid); color: var(--page-bg); }

/* Darker coral so the text passes contrast on white and tinted sections */
.btn--ghost { border: 1px solid var(--secondary-deep); color: var(--secondary-deep); }
.btn--ghost:hover { background: var(--secondary-a08); color: var(--secondary-deep); }

.btn--nav {
  background: var(--secondary);
  color: var(--accent-deep);
  padding: 9px 18px;
  font-size: 14px;
}
.btn--nav:hover { background: var(--secondary-light); color: var(--accent-deep); }
/* Beat ".nav a" so the button keeps its own text colors */
.nav a.btn--nav { color: var(--accent-deep); }
.nav a.btn--nav:hover { color: var(--accent-deep); }

.actions { display: flex; flex-wrap: wrap; gap: 16px; }
.actions--center { justify-content: center; }

/* ── Layout primitives ─────────────────────────────────────── */

.wrap { max-width: var(--measure-wide); margin: 0 auto; }
.wrap--narrow { max-width: var(--measure); margin: 0 auto; }
.wrap--tight { max-width: var(--measure-tight); margin: 0 auto; }

.section { padding: 88px var(--gutter); }
.section--tint {
  padding: 72px var(--gutter);
  background: linear-gradient(180deg, rgba(10, 52, 66, 0.06), rgba(10, 52, 66, 0.02));
}
.section--dark {
  padding: 72px var(--gutter);
  background: var(--accent-deep);
  color: var(--white);
}
.section--cta {
  padding: 88px var(--gutter);
  background: linear-gradient(135deg, var(--accent-a08), rgba(226, 124, 90, 0.10));
  text-align: center;
}

.kicker {
  font-size: 12px;
  font-weight: var(--fw-medium);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.kicker--onDark { color: var(--secondary-light); margin-bottom: 40px; }

.section__title { font-size: 32px; margin: 0 0 12px; }
.section__title--roomy { margin-bottom: 48px; max-width: 640px; }

.section__lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 48px;
  max-width: 620px;
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 96px var(--gutter) 72px;
  display: flex;
  align-items: center;
  gap: var(--gutter);
}

.hero__photo {
  width: 260px;
  height: 320px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--elev-1);
}
.hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: rotate(4deg) scale(1.25);
}

.hero__title {
  font-size: 56px;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0 0 24px;
}

.hero__lede {
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0 0 32px;
  max-width: 680px;
}

/* ── Cards ──────────────────────────────────────────────────── */

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); gap: 32px; }

.card {
  background: var(--white);
  border: 1px solid var(--accent-a15);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--elev-1);
}
.card__n { font-size: 13px; font-weight: var(--fw-medium); color: var(--accent); margin-bottom: 12px; }
.card__title { font-size: 18px; margin: 0 0 10px; }
.card__body { font-size: 14px; line-height: 1.6; color: var(--ink-muted); margin: 0; white-space: pre-line; }

/* Work cards */
.work-card {
  color: inherit;
  border: 1px solid var(--accent-a15);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-1);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 340px;
  overflow: hidden;
  background: var(--white);
  transition: box-shadow 140ms ease, transform 140ms ease;
}
.work-card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-width: 0;
  padding: 28px;
}

/* Left thumbnail: flush with the card's top/bottom/left edges, same
   placeholder language as the case-study screen slots */
.work-card__thumb {
  flex: 0 0 200px;
  align-self: stretch;
  border-right: 1px dashed rgba(11, 57, 72, 0.28);
  background:
    repeating-linear-gradient(
      135deg,
      var(--accent-a05) 0 10px,
      rgba(11, 57, 72, 0.02) 10px 20px
    );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}
.work-card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.work-card__thumb--img { background: var(--white); padding: 0; overflow: hidden; }
.work-card__thumbNote {
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.work-card:hover {
  text-decoration: none;
  color: inherit;
  box-shadow: var(--elev-8);
  transform: translateY(-2px);
}
.work-card__role {
  font-size: 12px;
  font-weight: var(--fw-medium);
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 4px;
}
.work-card__title { font-size: 20px; margin: 0; }
.work-card__blurb { font-size: 14px; line-height: 1.6; color: var(--ink-muted); margin: 0; flex: 1; }
.work-card__more { font-size: 14px; font-weight: var(--fw-medium); color: var(--accent); }
.work-card:hover .work-card__more { color: var(--accent-mid); }

.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  background: var(--accent-a08);
  color: var(--accent);
  font-size: 12px;
  font-weight: var(--fw-medium);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.tag--sm { font-size: 11px; padding: 3px 10px; }
.tag--skill {
  background: rgba(232, 190, 176, 0.35);
  border: 1px solid rgba(226, 124, 90, 0.4);
  font-size: 13px;
  font-weight: var(--fw-regular);
  padding: 6px 14px;
}

/* ── Stats ──────────────────────────────────────────────────── */

.stat__value { font-size: 40px; font-weight: var(--fw-medium); margin-bottom: 8px; }
.stat__label { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.65); }

/* ── Prose ──────────────────────────────────────────────────── */

.prose p { font-size: 16px; line-height: 1.7; color: var(--ink-muted); margin: 0 0 20px; }
.prose p:last-child { margin-bottom: 0; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose + .tags { margin-top: 28px; }

/* ── Footer ─────────────────────────────────────────────────── */

.site-footer {
  padding: 32px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--accent-a18);
  font-size: 13px;
  color: var(--ink-muted);
}
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* ── Coming soon (temporary homepage) ───────────────────────── */

.page--soon { min-height: 100vh; display: flex; flex-direction: column; background: var(--white); }
.soon { flex: 1; display: flex; align-items: center; justify-content: center; padding: 70px var(--gutter); text-align: center; }
.soon__wrap { max-width: 720px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.soon__kicker {
  font-size: 14px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--secondary-deep); /* darker coral, passes contrast on white */
  margin: 0;
}
.soon__title { font-size: 56px; line-height: 1.1; letter-spacing: -0.5px; color: var(--ink); margin: 0; }
.soon__lede { font-size: 16px; line-height: 1.7; color: var(--ink-muted); margin: 0; }
@media (max-width: 620px) { .soon__title { font-size: 38px; } }

/* ── Password page ──────────────────────────────────────────── */

.lock__link { text-decoration: underline; text-underline-offset: 2px; }
.lock { width: 100%; max-width: 420px; text-align: left; margin-top: 8px; }
.lock__label { display: block; font-size: 14px; font-weight: var(--fw-medium); color: var(--ink); margin-bottom: 8px; }
.lock__row { display: flex; gap: 12px; }
.lock__field { position: relative; flex: 1; min-width: 0; display: flex; }
.lock__toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--accent);
  cursor: pointer;
}
.lock__toggle:hover { background: var(--accent-a08); }
.lock__toggle:focus-visible { outline: 2px solid var(--accent-mid); outline-offset: 1px; }
.lock__input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 16px; /* 16px stops iPhones zooming in on focus */
  padding: 11px 72px 11px 14px; /* right side leaves room for Show/Hide */
  border: 1px solid var(--ink-muted);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
}
.lock__input:focus-visible { outline: 2px solid var(--accent-mid); outline-offset: 1px; border-color: var(--accent); }
.lock__input[aria-invalid="true"] { border-color: var(--secondary-deep); }
.lock__btn { border: 0; cursor: pointer; font-family: inherit; }
.lock__error { margin: 10px 0 0; font-size: 14px; color: var(--secondary-deep); font-weight: var(--fw-medium); }
@media (max-width: 620px) { .lock__row { flex-direction: column; } }

/* ─────────────────────────────────────────────────────────────
   Case study pages
   ───────────────────────────────────────────────────────────── */

.cs { max-width: var(--measure); margin: 0 auto; padding: 64px var(--gutter) 96px; }

.cs__kicker {
  font-size: 12px;
  font-weight: var(--fw-medium);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.cs__top { display: inline-block; font-size: 13px; font-weight: var(--fw-medium); margin-bottom: 20px; }
.cs__title { font-size: 40px; line-height: 1.2; margin: 0 0 12px; max-width: 700px; }
.cs__subtitle { font-size: 19px; line-height: 1.45; font-weight: var(--fw-medium); color: var(--ink); margin: 0 0 16px; max-width: 700px; }
.cs__lede { font-size: 17px; line-height: 1.7; color: var(--ink-muted); margin: 0 0 16px; max-width: 700px; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0 64px;
  padding: 24px;
  background: var(--accent-a05);
  border-radius: var(--radius-md);
}
.meta__k { font-size: 12px; color: var(--ink-muted); margin-bottom: 4px; }
.meta__v { font-size: 14px; font-weight: var(--fw-medium); margin: 0; }

.cs h2 { font-size: 22px; margin: 0 0 20px; }
.cs__intro { font-size: 16px; line-height: 1.7; color: var(--ink-muted); margin: 0 0 32px; }

.cs-section { margin-bottom: 0; }
.cs-section--textOnly { margin-bottom: 64px; }
.cs-section__kicker {
  font-size: 13px;
  font-weight: var(--fw-medium);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.cs-section__title { font-size: 26px; margin: 0 0 20px; max-width: 640px; }
.cs-section__body { font-size: 16px; line-height: 1.7; color: var(--ink-muted); margin: 0 0 16px; }

/* Numbered role steps */
.steps { display: flex; flex-direction: column; gap: 20px; margin: 0 0 64px; list-style: none; padding: 0; }
.step { display: flex; gap: 20px; border-top: 1px solid var(--accent-a18); padding-top: 20px; }
.step__n { font-size: 13px; font-weight: var(--fw-medium); color: var(--accent); width: 28px; flex-shrink: 0; }
.step__title { font-size: 16px; margin: 0 0 6px; }
.step__body { font-size: 15px; line-height: 1.6; color: var(--ink-muted); margin: 0; }

/* Problem cards (coral) */
.problems { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0 64px; }
.pcard {
  border: 1px solid var(--secondary-a30);
  background: var(--secondary-a08);
  border-radius: var(--radius-md);
  padding: 20px;
}
.pcard__title { font-size: 15px; margin: 0 0 8px; color: var(--secondary); }
.pcard__body { font-size: 14px; line-height: 1.6; color: var(--ink); margin: 0; }
.pcard--wide { grid-column: 1 / -1; }

/* Approach cards */
.approach { display: flex; flex-direction: column; gap: 24px; margin: 24px 0 64px; }
.acard { border: 1px solid var(--accent-a18); border-radius: var(--radius-md); padding: 24px; }
.acard__title { font-size: 16px; margin: 0 0 10px; }
.acard__body { font-size: 15px; line-height: 1.6; color: var(--ink-muted); margin: 0; }

/* Built panel */
.built {
  border: 1px solid var(--accent-a18);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0 64px;
}
.built__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.built__title { font-size: 16px; margin: 0; }
.built__meta { font-size: 13px; color: var(--ink-muted); margin: 0 0 20px; }

/* Screen shots and placeholders */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 24px 0 64px; }
/* Nested in the built panel (design system canvas) the grid carries no margin */
.built .shots { margin: 0; }
.shot { margin: 0; }
.shot__frame {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--accent-a05);
  display: block;
}
.shot__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot__cap { font-size: 12px; color: var(--ink-muted); margin: 8px 0 0; }

/* Placeholder panel: intentional, on-brand, swap-ready */
.shot__frame--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
  border: 1px dashed rgba(11, 57, 72, 0.28);
  background:
    repeating-linear-gradient(
      135deg,
      var(--accent-a05) 0 10px,
      rgba(11, 57, 72, 0.02) 10px 20px
    );
}
.shot__phName {
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--accent);
  line-height: 1.3;
}
.shot__phNote {
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.shot__phMark {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(11, 57, 72, 0.28);
  position: relative;
}
.shot__phMark::after {
  content: "";
  position: absolute;
  inset: 6px 6px auto 6px;
  height: 1px;
  background: rgba(11, 57, 72, 0.28);
  box-shadow: 0 5px 0 rgba(11, 57, 72, 0.28), 0 10px 0 rgba(11, 57, 72, 0.28);
}

/* Outcome cards (teal-blue) */
.outcomes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 64px; }
.outcomes--single { grid-template-columns: 1fr; }
.ocard {
  border: 1px solid var(--mid-a30);
  background: var(--mid-a08);
  border-radius: var(--radius-md);
  padding: 20px;
}
.ocard__stat { font-size: 28px; font-weight: var(--fw-medium); color: var(--accent); margin-bottom: 6px; }
.ocard__label { font-size: 14px; margin: 0 0 8px; }
.ocard__body { font-size: 13px; line-height: 1.6; color: var(--ink); margin: 0; }
.outcomes--single .ocard__label { font-size: 16px; }
.outcomes--single .ocard__body { font-size: 14px; }

/* Checklist ("What I enabled") */
.checks { display: flex; flex-direction: column; gap: 16px; margin: 0 0 64px; list-style: none; padding: 0; }
.check { display: flex; gap: 14px; border-top: 1px solid var(--accent-a18); padding-top: 16px; }
.check__mark { color: var(--accent); font-weight: var(--fw-bold); flex-shrink: 0; }
.check__title { font-size: 15px; margin: 0 0 6px; }
.check__body { font-size: 14px; line-height: 1.6; color: var(--ink-muted); margin: 0; }

/* Reflection */
.reflect { display: flex; flex-direction: column; gap: 24px; margin-bottom: 64px; }
.reflect__title { font-size: 16px; margin: 0 0 8px; }
.reflect__body { font-size: 15px; line-height: 1.7; color: var(--ink-muted); margin: 0; }

.cs__back { border-top: 1px solid var(--accent-a18); padding-top: 40px; margin-top: 40px; }
.cs__back a { font-size: 14px; font-weight: var(--fw-medium); }

/* ─────────────────────────────────────────────────────────────
   Responsive. The source artboards were desktop-only; these
   breakpoints are the added behavior, not a change of design.
   ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  :root { --gutter: 32px; }

  .hero { flex-direction: column; align-items: flex-start; padding-top: 64px; gap: 32px; }
  .hero__title { font-size: 40px; }
  .hero__lede { font-size: 19px; }

  .grid--2, .grid--3, .problems, .outcomes, .shots { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  .meta-grid { grid-template-columns: repeat(2, 1fr); }

  .section { padding: 64px var(--gutter); }
  .section__title, .section--cta .section__title { font-size: 26px; }
  .cs__title { font-size: 32px; }
  .cs-section__title { font-size: 22px; }
  .cs { padding-top: 48px; }
}

@media (max-width: 620px) {
  :root { --gutter: 20px; }

  .site-header { flex-wrap: wrap; gap: 12px; padding: 14px var(--gutter); }
  .nav { gap: 18px; flex-wrap: wrap; }

  .hero__photo { width: 100%; max-width: 260px; height: 280px; }
  .hero__title { font-size: 34px; }

  .grid--4 { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; }
  .stat__value { font-size: 32px; }

  .work-card { flex-direction: column; height: auto; }
  .work-card__thumb { flex: 0 0 auto; align-self: auto; width: 100%; height: 160px; border-right: none; border-bottom: 1px dashed rgba(11, 57, 72, 0.28); }

  .step { flex-direction: column; gap: 6px; }
  .actions .btn { flex: 1 1 auto; text-align: center; }
}

@media print {
  .site-header, .banner, .site-footer, .cs__back, .actions { display: none; }
  body { background: var(--white); }
  .shot__frame { height: auto; min-height: 120px; }
}
