/* =========================================================
   David Harding portfolio: styles.css
   One stylesheet shared by every page.
   Sections: 1 Tokens, 2 Base, 3 Header, 4 Buttons, 5 Hero,
   6 Sections, 7 Cards, 8 Case studies, 9 Footer, 10 Mobile
   ========================================================= */

/* 1. TOKENS: change a colour or size here and it changes everywhere */
:root {
  --black: #000000;
  --white: #ffffff;
  --muted: #d4d4d4;
  --line: rgba(255, 255, 255, 0.28);
  --radius: 16px;
  --margin: 40px;
  --font-display: "Obviously Narrow Black", "Anton", Impact, sans-serif;
  --font-text: "Saans", "Inter", system-ui, sans-serif;
}

/* 2. BASE */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
}
p { margin: 0 0 1em; color: var(--muted); }
.wrap { padding-left: var(--margin); padding-right: var(--margin); }
.label {
  font-size: 14px;
  line-height: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--white); color: var(--black); padding: 8px 16px; border-radius: 999px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

/* 3. HEADER (fixed bar across the top) */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--margin) 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0));
}
.brand { font-size: 20px; line-height: 24px; text-transform: uppercase; white-space: nowrap; }
.nav { display: flex; gap: 16px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--white);
  border-radius: 999px;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  text-transform: uppercase;
  color: var(--white);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.pill:hover, .pill[aria-current="page"] { background: var(--white); color: var(--black); }

/* 4. BUTTONS */
.pill-solid { background: var(--white); color: var(--black); }
.pill-solid:hover { background: var(--muted); }
.pill-solid svg { stroke: var(--black); }
.copy-btn { min-width: 300px; justify-content: center; }
.copy-btn svg { width: 20px; height: 20px; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* 5. HERO */
.hero {
  position: relative;
  min-height: 1050px;
  overflow: hidden;
}
.hero h1 {
  position: absolute;
  top: 99px; left: 0; right: 0;
  z-index: 3;
  text-align: center;
  font-size: clamp(56px, 11.25vw, 162px);
  line-height: 0.914;
  padding: 0 var(--margin);
}
.hero h1 span { display: block; }
.hero-image {
  position: absolute;
  top: 182px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: min(800px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: brightness(0.9);
  /* fades the photo into the black on all four edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 78%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 78%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.hero-foot {
  position: absolute;
  left: var(--margin); right: var(--margin);
  top: 836px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}
.hero-sub { max-width: 540px; margin: 0; font-size: 20px; line-height: 28px; color: var(--white); }
.hero-stats { display: flex; gap: 40px; text-align: right; }
.stat-num { font-family: var(--font-display); text-transform: uppercase; font-size: 64px; line-height: 64px; }
.stat-cap { font-size: 14px; line-height: 20px; text-transform: uppercase; color: var(--muted); }

/* 6. SECTIONS */
.section { padding-top: 120px; padding-bottom: 120px; border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(56px, 7.8vw, 112px); line-height: 0.93; margin: 16px 0 48px; }
.page-top { padding-top: 160px; }
.lede { font-size: 22px; line-height: 34px; color: var(--white); max-width: 760px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.stat-tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 24px; }
.stat-tile .stat-num { font-size: clamp(56px, 7.2vw, 104px); line-height: 1; }
.note { margin-top: 32px; font-size: 16px; line-height: 24px; }
.todo { color: var(--white); border-bottom: 1px dashed var(--white); }   /* marks things you still need to fill in */
.skill { border-top: 1px solid var(--line); padding-top: 20px; }
.skill h3 { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.facts { border-top: 1px solid var(--line); padding-top: 16px; font-size: 16px; line-height: 28px; color: var(--white); }

/* 7. CARDS */
.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
a.card:hover { border-color: var(--white); }
.card img { width: 100%; height: 300px; object-fit: cover; }
.card-body { padding: 24px; display: flex; flex-direction: column; flex-grow: 1; }
.card h3 { font-size: 40px; line-height: 1; margin: 8px 0 12px; }
.card-stat { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; line-height: 22px; color: var(--white); }
.story-card img { height: 420px; }

/* 8. CASE STUDIES */
.case-hero h1 { font-size: clamp(64px, 9.5vw, 136px); line-height: 0.93; margin: 16px 0 24px; }
.case-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 32px; }
.case-image { border-radius: var(--radius); width: 100%; object-fit: cover; }
.case-block { border-top: 1px solid var(--line); padding-top: 16px; }
.case-block h3 { font-family: var(--font-text); font-size: 14px; line-height: 20px; letter-spacing: 0.04em; margin-bottom: 8px; }
.case-block p { font-size: 18px; line-height: 28px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: start; }
.next-case { display: block; padding: 80px var(--margin); border-top: 1px solid var(--line); }
.next-case h2 { font-size: clamp(56px, 8vw, 120px); line-height: 0.93; margin-top: 12px; }
.next-case:hover h2 { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px; }

/* 9. FOOTER */
.site-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 32px var(--margin);
  border-top: 1px solid var(--line);
  font-size: 14px; line-height: 20px; text-transform: uppercase; color: var(--muted);
}
.contact-big { font-size: clamp(88px, 14vw, 200px); line-height: 0.9; margin-bottom: 40px; }
.contact-btn { font-size: 20px; padding: 12px 24px; min-width: 340px; justify-content: center; }

/* 10. MOBILE AND TABLET */
@media (max-width: 1100px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .site-header .copy-btn { display: none; }
}
@media (max-width: 800px) {
  :root { --margin: 20px; }
  .site-header { flex-wrap: wrap; padding-top: 16px; background: var(--black); }
  .nav { width: 100%; flex-wrap: wrap; gap: 8px; }
  .pill { font-size: 14px; padding: 6px 12px; }
  .hero { min-height: 0; padding-top: 190px; padding-bottom: 40px; }
  .hero h1 { position: static; padding: 0 var(--margin); }
  .hero-image { position: static; transform: none; margin: -10px auto 0; width: 100%; }
  .hero-foot { position: static; flex-direction: column; margin-top: -40px; padding: 0 var(--margin); }
  .hero-stats { text-align: left; gap: 24px; }
  .stat-num { font-size: 48px; line-height: 48px; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-top { padding-top: 200px; }
  .copy-btn, .contact-btn { min-width: 0; width: 100%; }
}
