/* NORTHLINE portfolio case study — tokens from Figma */

:root {
  --accent-glacier: #2563eb;
  --ink-primary: #111827;
  --ink-secondary: #4b5563;
  --ink-muted: #9ca3af;
  --surface-white: #ffffff;
  --surface-subtle: #f3f4f6;
  --border-subtle: #e5e7eb;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --page-max: 1440px;
  --content-pad: 120px;
  --content-width: 1200px;
  --copy-width: 900px;
  --copy-width-wide: 960px;
  --copy-width-narrow: 560px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--surface-white);
  color: var(--ink-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2,
p,
ul,
dl,
dd,
dt,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Layout */

.portfolio {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--surface-white);
}

.section {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: var(--content-pad);
  background: var(--surface-white);
}

.section--checkout,
.section--mobile {
  gap: 64px;
}

.section--split {
  flex-direction: row;
  align-items: center;
  gap: 80px;
}

.section__copy {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  max-width: var(--copy-width);
}

.section__copy--checkout {
  gap: 24px;
  max-width: var(--copy-width-wide);
}

.section__copy--narrow {
  max-width: var(--copy-width-narrow);
  flex: 0 0 auto;
  width: var(--copy-width-narrow);
}

/* Typography */

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  line-height: normal;
  color: var(--accent-glacier);
}

.section__title {
  font-size: 40px;
  font-weight: 800;
  line-height: 48px;
  letter-spacing: -1px;
  color: var(--ink-primary);
}

.body {
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  color: var(--ink-secondary);
}

.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Hero */

.hero {
  gap: 48px;
  align-items: flex-start;
  padding-top: 60px;
  padding-bottom: 80px;
}

.hero__intro {
  display: flex;
  gap: 64px;
  align-items: flex-start;
  width: 100%;
}

.hero__copy {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.hero__headline {
  font-size: 76px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2.5px;
  color: var(--ink-primary);
}

.hero__project-name {
  font-size: 21px;
  font-weight: 600;
  color: var(--ink-primary);
}

.hero__lede {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-secondary);
  max-width: 48ch;
}

.hero__meta-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 0 0 336px;
  width: 336px;
  padding: 28px;
  background: var(--surface-subtle);
  border-radius: 6px;
}

.hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero__meta-item dt {
  font-size: 12px;
  font-weight: 600;
  color: #6d7786;
}

.hero__meta-item dd {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-primary);
}

/* Question block */

.question-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 24px;
  background: var(--surface-subtle);
  border-radius: 12px;
}

.question-block__text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-primary);
}

/* Highlight list */

.highlight-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.highlight-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-primary);
}

.highlight-list li::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-glacier);
}

/* Screen frames — subtle keylines, no device chrome */

.screen-frame {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: var(--content-width);
}

.screen-frame--challenge {
  flex: 0 0 auto;
  width: var(--copy-width-narrow);
  max-width: var(--copy-width-narrow);
}

.screen-frame__media {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  background: var(--surface-white);
}

.screen-frame__media img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.screen-frame__media--mobile {
  border-radius: 8px;
}

.screen-frame figcaption {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-muted);
}

.checkout-sequence {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
  max-width: var(--content-width);
}

.mobile-sequence {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
  max-width: var(--content-width);
}

.screen-frame--mobile {
  flex: 1 1 0;
  min-width: 0;
  max-width: 360px;
}

/* Closing */

.closing {
  align-items: center;
  gap: 48px;
  padding-bottom: 160px;
}

.closing__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: var(--copy-width-wide);
  text-align: center;
}

.closing__headline {
  font-size: 56px;
  font-weight: 700;
  line-height: 64px;
  letter-spacing: -1.5px;
  color: var(--ink-primary);
}

.closing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 24px;
  width: 100%;
  max-width: var(--copy-width-wide);
}

.closing__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.closing__item p:last-child {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-primary);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 320px;
  height: 64px;
  border-radius: 8px;
  background: var(--ink-primary);
  color: var(--surface-white);
  font-size: 16px;
  font-weight: 600;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cta:hover {
  opacity: 0.9;
}

.cta:focus-visible {
  outline: 2px solid var(--accent-glacier);
  outline-offset: 3px;
}

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Responsive */

@media (max-width: 1200px) {
  :root {
    --content-pad: 80px;
  }

  .section--split {
    gap: 48px;
  }

  .section__copy--narrow,
  .screen-frame--challenge {
    width: auto;
    max-width: none;
    flex: 1 1 0;
  }

  .hero__headline {
    font-size: 64px;
  }

  .closing__headline {
    font-size: 48px;
    line-height: 56px;
  }
}

@media (max-width: 960px) {
  :root {
    --content-pad: 64px;
  }

  .section--split {
    flex-direction: column;
    align-items: stretch;
    gap: 40px;
  }

  .section__copy,
  .section__copy--checkout,
  .section__copy--narrow {
    max-width: 100%;
  }

  .hero__intro {
    flex-direction: column;
    gap: 32px;
  }

  .hero__meta-card {
    flex: 0 0 auto;
    width: 100%;
  }

  .hero__headline {
    font-size: 48px;
  }

  .section__title {
    font-size: 32px;
    line-height: 40px;
  }

  .closing__headline {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -1px;
  }

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

  .mobile-sequence {
    gap: 24px;
  }
}

@media (max-width: 720px) {
  :root {
    --content-pad: 40px;
  }

  .section,
  .section--checkout,
  .section--mobile {
    gap: 32px;
  }

  .hero {
    gap: 32px;
    padding-top: 40px;
    padding-bottom: 48px;
  }

  .hero__headline {
    font-size: 36px;
    letter-spacing: -1px;
  }

  .section__title {
    font-size: 28px;
    line-height: 36px;
    letter-spacing: -0.5px;
  }

  .body {
    font-size: 18px;
    line-height: 28px;
  }

  .closing {
    gap: 40px;
    padding-bottom: 96px;
  }

  .closing__copy {
    text-align: left;
  }

  .closing__headline {
    font-size: 32px;
    line-height: 40px;
  }

  .closing__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cta {
    width: 100%;
    max-width: 320px;
  }

  .mobile-sequence {
    flex-direction: column;
    align-items: center;
  }

  .screen-frame--mobile {
    width: 100%;
    max-width: 360px;
  }
}
