/* index page styles
 * Organized as a standalone cached stylesheet for this static portfolio.
 */

:root {
  --ink: #1f1b18;
  --muted: #746d68;
  --paper: #f5f2ee;
  --purple: #794ca6;
  --coffee: #7a4d2f;
  --line: rgba(31,27,24,.1);
  --shadow: 0 28px 90px rgba(48,32,22,.13);
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",Inter,"Segoe UI",sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 14% 8%,rgba(121,76,166,.15),transparent 27%),radial-gradient(circle at 88% 12%,rgba(122,77,47,.16),transparent 25%),var(--paper);
  line-height: 1.45;
}

/* Navigation -------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px clamp(18px,4vw,56px);
  background: rgba(245,242,238,.78);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.68);
}

.brand {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: #1f1b18;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

/* Portfolio frame --------------------------------------------------------- */

.shell {
  width: min(calc(100% - 32px),1280px);
  margin: 24px auto 44px;
  padding: clamp(26px,4.5vw,50px);
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 34px;
  background: linear-gradient(180deg,rgba(255,255,255,.74),rgba(255,255,255,.38));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
  font-size: clamp(48px,8vw,112px);
  line-height: .96;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  margin: 20px 0 0;
  color: #4a4541;
  font-size: clamp(20px,2.7vw,34px);
  line-height: 1.16;
  font-weight: 650;
}

/* Case-study cards -------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
  margin-top: 38px;
  align-items: stretch;
}

.card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 24px;
  background: rgba(255,255,255,.7);
  box-shadow: 0 24px 74px rgba(48,32,22,.12);
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease,box-shadow 180ms ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 88px rgba(48,32,22,.17);
}

.media {
  aspect-ratio: 16/9;
  background: #ddd;
  overflow: hidden;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.copy h2 {
  margin: 8px 0 0;
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
  font-size: clamp(30px,4vw,48px);
  line-height: 1;
}

.copy p {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 16px;
}

.pill {
  display: inline-flex;
  align-self: flex-start;
  margin-top: auto;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--purple);
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(121,76,166,.22);
  transition: transform 180ms ease,box-shadow 180ms ease,filter 180ms ease;
}

.pill::after {
  content: "→";
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.card:hover .pill {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(121,76,166,.28);
  filter: saturate(1.05);
}

.card:hover .pill::after {
  transform: translateX(3px);
}

.card:focus-visible {
  outline: 3px solid rgba(31,27,24,.28);
  outline-offset: 5px;
}

.coffee .pill {
  background: var(--coffee);
  box-shadow: 0 14px 30px rgba(122,77,47,.22);
}

.coffee:hover .pill {
  box-shadow: 0 18px 38px rgba(122,77,47,.3);
}

/* Responsive layout ------------------------------------------------------- */

@media(max-width:760px) {
  .header {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(calc(100% - 18px),1280px);
    border-radius: 24px;
    padding: 24px 18px;
    margin-top: 14px;
  }

  .grid {
    margin-top: 30px;
  }

  h1 {
    font-size: clamp(46px,15vw,76px);
  }

}

/* Accessibility ----------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
