:root {
  --paper: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, 0.16);
  --accent: #e57d4f;
  --apple-blue: #0071e3;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #f5f5f7;
  color: var(--ink);
  font-family: "DM Mono", monospace;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.canvas {
  min-height: 100vh;
  padding: clamp(14px, 3vw, 42px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.paper {
  position: relative;
  width: min(100%, 1180px);
  min-height: min(820px, calc(100vh - 72px));
  padding: clamp(24px, 5vw, 70px) clamp(24px, 7vw, 104px) 28px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: 0 24px 60px rgba(29, 29, 31, 0.10);
  isolation: isolate;
}

/* A slightly irregular drawn edge echoes the reference image without using an image asset. */
.paper::before,
.paper::after {
  position: absolute;
  content: "";
  z-index: -1;
  pointer-events: none;
}

.paper::before {
  inset: 1px;
  border: 2px solid var(--ink);
  clip-path: polygon(1.8% 1.4%, 18% 1.8%, 35% 1.3%, 57% 2%, 77% 1.5%, 98.1% 2.2%, 97.3% 24%, 98.2% 52%, 97.5% 98%, 76% 98%, 54% 98%, 34% 98%, 14% 98%, 1.9% 98%, 2.3% 76%, 1.5% 51%, 2.2% 24%);
}

.paper::after {
  inset: auto 7px 3px 7px;
  height: 1px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.35);
  transform: none;
}

.masthead,
.footer,
.section-heading,
.project-meta {
  display: flex;
  align-items: center;
}

.masthead { justify-content: flex-end; }

.studio-name {
  color: #424245;
  font-family: "DM Mono", monospace;
  font-size: clamp(12px, 1.25vw, 16px);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.studio-ampersand {
  color: var(--accent);
  font-weight: 700;
}

.hero {
  position: relative;
  flex: 1;
  min-height: 410px;
  padding: clamp(55px, 9vh, 105px) 0 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h2,
h3 { margin: 0; font-weight: 400; }

.logo {
  width: min(100%, 690px);
  height: auto;
  display: block;
  margin-left: -10px;
  filter: contrast(1.02);
}

.blurb {
  max-width: 640px;
  margin: clamp(10px, 2vw, 22px) 0 0 5px;
  color: #424245;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 3vw, 34px);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.projects { padding: 10px 0 64px; }

.section-heading {
  gap: 14px;
  margin-bottom: 23px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-heading h2 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  letter-spacing: -0.03em;
  text-transform: none;
}
.section-heading .rule { height: 1px; flex: 1; background: var(--line); }

.project-card {
  position: relative;
  max-width: 540px;
  padding: 21px 24px 20px;
  border: 1px solid var(--ink);
  transform: rotate(0.45deg);
}

.project-card::before {
  position: absolute;
  content: "";
  inset: 5px -5px -5px 5px;
  border: 1px solid var(--line);
  z-index: -1;
}

.project-meta {
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 125, 79, 0.14);
}

.project-card h3 {
  margin: 21px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 0.85;
  letter-spacing: -0.045em;
}

.project-card p {
  max-width: 470px;
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}

.project-number {
  display: block;
  margin-top: 24px;
  color: var(--muted);
  font-size: 10px;
}

.footer {
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.footer a { text-decoration: none; color: var(--ink); }
.footer a:hover { color: var(--accent); }

.legal {
  max-width: 650px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
  text-align: right;
}

.legal summary {
  cursor: pointer;
  color: var(--ink);
  list-style-position: inside;
}

.legal-copy {
  max-width: 590px;
  margin-top: 13px;
  text-align: left;
}

.legal-copy p { margin: 0 0 10px; }
.legal-copy strong { color: var(--ink); font-weight: 500; }
.legal-copy a { color: var(--ink); }

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: clamp(14px, 3vw, 38px);
  z-index: 10;
  width: min(620px, calc(100vw - 28px));
  padding: 20px 22px;
  display: flex;
  align-items: flex-end;
  gap: 22px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 16px 45px rgba(42, 36, 28, 0.26);
  transform: translateX(-50%);
}

.cookie-banner[hidden] { display: none; }

.cookie-label {
  margin: 0 0 7px;
  color: #f3a17c;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cookie-banner p:not(.cookie-label) {
  max-width: 390px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.35;
}

.cookie-actions {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  gap: 8px;
}

.cookie-button {
  min-width: 128px;
  padding: 10px 12px;
  border: 1px solid var(--paper);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.cookie-button--quiet {
  border-color: rgba(247, 245, 239, 0.45);
  background: transparent;
  color: var(--paper);
}

.cookie-button:hover { background: var(--apple-blue); border-color: var(--apple-blue); color: #fff; }

@media (max-width: 650px) {
  .canvas { padding: 12px; }
  .paper { min-height: calc(100vh - 24px); padding: 26px 23px 22px; }
  .hero { min-height: 390px; padding-top: 72px; }
  .logo { margin-left: -5px; }
  .blurb { margin: 10px 0 0 2px; font-size: 24px; }
  .project-card { padding: 22px 20px 20px; }
  .footer { flex-direction: column; gap: 15px; }
  .legal { text-align: left; }
  .cookie-banner { align-items: stretch; flex-direction: column; gap: 16px; }
  .cookie-actions { flex-direction: row-reverse; }
  .cookie-button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
