/* ==========================================================================
   Shannon Winnell — portfolio
   Breakpoints: desktop (default) · tablet ≤1024px · mobile ≤640px
   ========================================================================== */

:root {
  --ink: #000;
  --muted: #3a3a3a;
  --line: #dbccc8;          /* warm hairline used for all dividers */
  --nav-active: #f4f4f4;
  --media-bg: #ededed;      /* matches the grey baked into the mockup images */
  --lime: #daff5f;
  --japan: #fc4d1d;

  --gutter: 40px;           /* page side padding */
  --measure: 800px;         /* max width of reading column */
  --header-h: 80px;

  --fs-body: 20px;
  --fs-title: 30px;
  --fs-h2: 22px;
  --fs-quote: 24px;
  --fs-nav: 20px;
  --fs-card: 18px;
  --fs-small: 16px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 8px; top: -60px;
  background: var(--ink); color: #fff; padding: 8px 14px; z-index: 10;
}
.skip-link:focus { top: 8px; }

main { flex: 1; }

/* ---------- Header / nav ---------- */
.site-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-height: var(--header-h);
  border-bottom: 1px solid var(--line);
}
.site-header__name {
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  font-size: var(--fs-nav);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav { display: flex; }
.site-nav a {
  display: flex;
  align-items: center;
  padding: 0 39px;
  font-size: var(--fs-nav);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:last-child { padding-right: 26px; }
.site-nav a:hover { background: var(--nav-active); }
.site-nav a[aria-current="page"] { background: var(--nav-active); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 33px 30px;
  font-size: var(--fs-body);
}

/* ---------- Shared page bits ---------- */
.page { padding: 56px var(--gutter) 96px; }
.page-title {
  font-size: var(--fs-title);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 52px;
}
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 33px; }   /* one blank line between blocks */
.prose h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.4; margin-top: 64px; }
.prose h2 + * { margin-top: 33px; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--fs-body); font-weight: 600; line-height: 1.65; }
.prose h3 + p { margin-top: 0; }
.prose ul { padding-left: 32px; }
.prose li::marker { font-size: 0.8em; }
.prose figure { margin: 56px 0; }

/* ---------- Home ---------- */
.home-intro {
  padding: 60px 45px 52px;
  border-bottom: 1px solid var(--line);
}
.home-intro p { max-width: 780px; }

/* The art column hugs the portrait, so the top, right and bottom
   keylines all sit the same distance (--frame) from the artwork. */
.home-feature {
  --frame: 56px;
  --portrait-w: min(800px, 62vw);
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
}
.home-feature__art {
  border-right: 1px solid var(--line);
  padding: var(--frame) var(--frame) var(--frame) 33px;
}

/* Dotted portrait with the 3×3 lime grid laid over it */
.portrait {
  position: relative;
  width: var(--portrait-w);
  aspect-ratio: 800 / 743;
}
.portrait img { width: 100%; height: 100%; }
.portrait__grid {
  position: absolute;
  inset: 1.2% 9.25% 10.25% 7.9%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10.5%;
  pointer-events: none;
}
.portrait__grid span {
  background: var(--lime);
  mix-blend-mode: multiply;   /* lets the dots show through the squares */
}

/* ---------- About ---------- */
.about .prose > h3 { margin-top: 33px; }
.about .prose > h3:first-child { margin-top: 0; }

/* ---------- Work grid ---------- */
.work-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px 47px;
}
.work-index { padding-left: 32px; padding-right: 33px; }
.work-index .page-title { padding-left: 8px; }

.work-card { display: block; text-decoration: none; }
.work-card__thumb {
  aspect-ratio: 427 / 255;
  overflow: hidden;
  margin-bottom: 30px;
}
.work-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.work-card:hover .work-card__thumb img { transform: scale(1.03); }
.work-card__client { font-size: var(--fs-card); font-weight: 600; line-height: 1.75; }
.work-card__project { font-size: var(--fs-card); line-height: 1.75; }
a.work-card:hover .work-card__project { text-decoration: underline; text-underline-offset: 3px; }

/* Japan tile is drawn in CSS — no image needed */
.work-card__thumb--japan {
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: #fff;
}
.work-card__thumb--japan::after {
  content: "";
  width: 35.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--japan);
  transition: transform .4s ease;
}
.work-card:hover .work-card__thumb--japan::after { transform: scale(1.06); }

/* ---------- Case study (work page template) ---------- */
.case-header {
  display: grid;
  grid-template-columns: minmax(0, 880fr) minmax(0, 560fr);
  border-bottom: 1px solid var(--line);
}
.case-header__title {
  display: flex;
  flex-direction: column;
  padding: 56px var(--gutter) 48px;
}
.case-header__title h1 {
  font-size: var(--fs-title);
  font-weight: 600;
  line-height: 1.3;
}
.case-header__title .case-sub {
  font-size: var(--fs-title);
  font-weight: 400;
  line-height: 1.15;
  margin-top: 6px;
}
.back-link {
  margin-top: auto;
  padding-top: 72px;
  font-size: var(--fs-small);
}
.case-header__intro {
  border-left: 1px solid var(--line);
  padding: 60px 54px 72px;
}

.case-section {
  padding: 56px var(--gutter) 48px;
  border-bottom: 1px solid var(--line);
}
.case-section:last-of-type { border-bottom: 0; padding-bottom: 120px; }
.case-section > .prose > figure:first-child { margin-top: 0; }

.media {
  margin: 56px 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--media-bg);
}
.media img { width: 100%; }

.pull-quote {
  padding: 56px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.pull-quote p {
  max-width: 760px;
  font-size: var(--fs-quote);
  font-style: italic;
  line-height: 1.67;
}

/* Thumbnail grid (e.g. Japan archive) */
.thumb-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.prose .thumb-grid { padding-left: 0; margin-top: 56px; }
.thumb-grid img {
  width: 100%;
  aspect-ratio: 300 / 175;
  object-fit: cover;
}

/* ---------- Contact ---------- */
.contact-form { max-width: 640px; margin-top: 48px; }
.field + .field { margin-top: 28px; }
.field label {
  display: block;
  font-size: var(--fs-card);
  font-weight: 600;
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: var(--fs-card);
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b9aaa6;
  border-radius: 0;
  padding: 12px 14px;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 180px; }
.field input:focus,
.field textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: #c62828; }
.field-error { display: block; margin-top: 6px; font-size: var(--fs-small); color: #c62828; }
.field-error:empty { display: none; }

.button {
  margin-top: 36px;
  font: inherit;
  font-size: var(--fs-card);
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 14px 28px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.button:hover { background: #fff; color: var(--ink); }
.button:disabled { opacity: .5; cursor: progress; }

.form-status { font-size: var(--fs-card); }
.form-status:empty { display: none; }
.form-status--success { padding: 16px 20px; margin-bottom: 32px; background: var(--lime); }
.form-status--error { padding: 16px 20px; margin-bottom: 32px; background: #fdecea; color: #8e1c1c; }

/* Visually hidden but present in the DOM (used for the spam trap field) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   Tablet ≤ 1024px
   ========================================================================== */
@media (max-width: 1024px) {
  .site-nav a { padding: 0 20px; }
  .site-nav a:last-child { padding-right: 34px; }

  /* Header splits 50/50 and the reading column centres on the page */
  .case-header { grid-template-columns: 1fr 1fr; }
  .case-header__title { padding: 56px 50px 48px; }
  .case-header__intro { padding: 52px 40px 48px; font-size: 18px; line-height: 1.83; }
  .case-section .prose,
  .pull-quote p { margin-inline: auto; }
  .pull-quote p { max-width: var(--measure); }

  .home-feature { --frame: 40px; }

  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 40px; }
}

/* ==========================================================================
   Mobile ≤ 640px
   ========================================================================== */
@media (max-width: 640px) {
  :root {
    --fs-body: 18px;
    --fs-title: 26px;
    --fs-h2: 20px;
    --fs-quote: 21px;
    --fs-nav: 18px;
  }

  .site-nav a { padding: 0 14px; }
  .site-nav a:last-child { padding-right: 34px; }

  /* Title block, then the intro underneath with a rule between */
  .case-header { grid-template-columns: 1fr; }
  .case-header__title { padding: 48px 50px 44px; }
  .back-link { padding-top: 40px; }
  .case-header__intro {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 40px 42px 48px;
    font-size: 17px;
  }
  .case-section { padding: 48px var(--gutter) 40px; }
  .case-section .prose { margin-inline: 0; max-width: none; }
  .pull-quote { padding: 48px var(--gutter); }
  .pull-quote p { margin-inline: 0; }
  .media { margin: 48px 0; border-radius: 12px; }

  .home-intro { padding: 44px var(--gutter); }
  .home-feature { grid-template-columns: 1fr; --portrait-w: 100%; }
  .home-feature__art { border-right: 0; padding: 40px 24px; }

  .page-title { margin-bottom: 36px; }
  .work-index { padding-left: var(--gutter); padding-right: var(--gutter); }
  .work-index .page-title { padding-left: 0; }
  .work-grid { grid-template-columns: 1fr; gap: 48px; }
  .work-card__thumb { margin-bottom: 20px; }
  .thumb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

  .site-footer { padding: 24px var(--gutter); }
}

/* Small phones: stack name above the nav so nothing gets squashed */
@media (max-width: 480px) {
  :root { --gutter: 20px; }
  .site-header { flex-direction: column; }
  .site-header__name { min-height: 56px; }
  .site-nav { border-top: 1px solid var(--line); }
  .site-nav a,
  .site-nav a:last-child { flex: 1; justify-content: center; padding: 14px 8px; }
  .case-header__title,
  .case-header__intro { padding-left: var(--gutter); padding-right: var(--gutter); }
}
