/* Open When: scrapbook site. Relative paths only. */
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/CormorantGaramond-Italic.woff") format("woff"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans.woff") format("woff"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../fonts/Caveat.woff") format("woff"); font-weight: 400 700; font-display: swap; }

:root {
  --kraft: #fcf2e2;
  --page-background: var(--kraft) url("../img/paper-grain.svg") 0 0 / 160px 160px repeat;
  --paper: #fffaf0;
  --paper-2: #f6ecd9;
  --taupe: #d9c8a8;
  --ink: #2f211a;
  --ink-soft: #5d4a3e;
  --chestnut: #9d5b3d;
  --postage: #c46940;
  --postman-green: #394b44;
  --amber: #8f5412;
  --teal: #1d5a5f;
  --mauve: #8a7f7c;
  --pistachio: #a7b07a;
  --blue: #2a43b8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: var(--serif);
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0; font-family: var(--sans); font-size: 1.05rem; line-height: 1.65; color: var(--ink);
  background: var(--page-background); position: relative; overflow-x: clip; isolation: isolate;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--chestnut); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
.wrap { width: min(var(--max), 92vw); margin-inline: auto; position: relative; }

/* ---------- shared scrapbook bits ---------- */
.deco { position: absolute; pointer-events: none; z-index: 0; }
.tape {
  position: absolute; width: 112px; height: 30px; z-index: 3;
  background: repeating-linear-gradient(135deg, rgba(196,146,104,.62) 0 9px, rgba(236,208,170,.62) 9px 18px);
  box-shadow: 0 1px 3px rgba(60,40,25,.25);
}
.tape.teal { background: repeating-linear-gradient(135deg, rgba(86,140,140,.55) 0 9px, rgba(190,222,214,.6) 9px 18px); }
.tape.pink { background: repeating-linear-gradient(135deg, rgba(214,140,150,.55) 0 9px, rgba(246,208,208,.6) 9px 18px); }
.tape.tl { top: -14px; left: -24px; transform: rotate(-38deg); }
.tape.tr { top: -14px; right: -24px; transform: rotate(38deg); }
.tape.tc { top: -16px; left: 50%; margin-left: -56px; transform: rotate(-3deg); }
.polaroid {
  position: relative; background: #fffdf8; padding: 12px 12px 52px; box-shadow: 0 10px 22px rgba(60,40,25,.28);
  margin: 0; width: 100%;
}
.polaroid img, .polaroid video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #ddd; }
.polaroid figcaption { position: absolute; left: 12px; right: 12px; bottom: 10px; font-family: var(--hand); font-size: 1.45rem; line-height: 1.1; color: var(--ink); text-align: center; }
.note {
  position: relative; background: var(--paper); padding: 26px 26px 24px; box-shadow: 0 8px 18px rgba(60,40,25,.22);
  border-radius: 2px;
}
.tilt-l { transform: rotate(-2deg); } .tilt-r { transform: rotate(2deg); }
.tilt-l2 { transform: rotate(-1deg); } .tilt-r2 { transform: rotate(1.2deg); }
.hand { font-family: var(--hand); }

h1, h2, h3 { margin: 0; font-weight: 400; }
h1 { font-family: var(--script); font-weight: 700; font-style: italic; font-size: clamp(3.4rem, 11vw, 7.2rem); line-height: 1; color: var(--ink); text-shadow: 3px 3px 0 rgba(255,250,240,.55); letter-spacing: .5px; }
h2 { font-family: var(--script); font-weight: 700; font-style: italic; font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; color: var(--ink); }
.kicker { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .09em; color: var(--chestnut); margin: 0 0 9px; text-transform: uppercase; }
.sub { font-family: var(--sans); font-weight: 400; font-size: clamp(1.05rem, 2.3vw, 1.3rem); color: var(--ink-soft); margin: 12px 0 0; line-height: 1.5; }
.lead-note { font-size: 1.1rem; max-width: 60ch; }

/* ---------- nav ---------- */
.site-nav { position: sticky; top: 0; z-index: 50; background: var(--page-background); border-bottom: 1px dashed rgba(93,74,62,.22); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--script); font-weight: 700; font-style: italic; font-size: 1.5rem; }
.brand img { width: 44px; height: auto; flex-shrink: 0; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 18px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--sans); font-size: .9rem; font-weight: 500; color: var(--ink); text-decoration: none; padding: 2px 4px; }
.nav-links a:hover { color: var(--chestnut); text-decoration: underline wavy var(--chestnut) 2px; text-underline-offset: 5px; }

/* ---------- hero ---------- */
.hero { text-align: left; position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: clamp(32px, 6vw, 80px); align-items: center; align-content: center; min-height: calc(100svh - var(--nav-height, 58px)); padding-block: clamp(40px, 6vw, 80px); }
.hero-copy { position: relative; z-index: 1; text-align: center; }
.hero h1 { font-size: clamp(4rem, 7.6vw, 6.5rem); }
.hero .sub { max-width: 42ch; margin-inline: auto; text-wrap: balance; }
.hero .hero-cta { margin-top: 24px; background: var(--postman-green); color: var(--paper); }
.hero .hero-cta:hover { color: var(--paper); }
.intro-note { max-width: 720px; margin: clamp(36px, 5vw, 56px) auto 0; text-align: left; }
.intro-note p { margin: 0 0 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 18px; }
.sticker {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-family: var(--sans); font-size: .95rem; font-weight: 600; line-height: 1.4; text-decoration: none;
  padding: 12px 22px; border-radius: 14px 18px 12px 20px; color: #fff; background: var(--chestnut);
  box-shadow: 3px 4px 0 rgba(47,33,26,.55); transform: rotate(-1.5deg); transition: transform .15s;
}
.sticker.alt { background: var(--paper); color: var(--chestnut); border: 2px solid var(--chestnut); box-shadow: 3px 4px 0 rgba(47,33,26,.35); transform: rotate(1.5deg); }
.sticker:hover { transform: rotate(0) translateY(-2px); color: #fff; }
.sticker.alt:hover { color: var(--teal); }

/* ---------- sections ---------- */
section { padding: clamp(44px, 6vw, 76px) 0 clamp(18px, 3vw, 30px); position: relative; }
#next { padding-top: clamp(24px, 4vw, 40px); }
.section-head { margin-bottom: 26px; }
.section-head p.intro { max-width: 60ch; margin: 10px 0 0; color: var(--ink-soft); }

/* how it works */
.index-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 4vw, 44px); padding-top: 10px; }
.index-cards .note { min-height: 230px; }
.index-cards .note:nth-child(1) { transform: rotate(-2deg); }
.index-cards .note:nth-child(2) { transform: rotate(1.5deg) translateY(10px); }
.index-cards .note:nth-child(3) { transform: rotate(-1deg); }
.index-cards .note .quote { font-family: var(--hand); font-size: 1.45rem; font-style: normal; line-height: 1.2; color: var(--chestnut); margin: 0 0 14px; font-weight: 600; }
.index-cards .note h3 { font-family: var(--serif); font-style: italic; font-size: 2rem; line-height: 1.1; font-weight: 700; color: var(--amber); margin: 6px 0 8px; }
.note p { margin: 0; color: var(--ink-soft); }

/* video */
.video-spread { display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(26px, 5vw, 60px); align-items: center; }
.video-polaroid { padding: 14px 14px 58px; transform: rotate(-1.2deg); }
.video-polaroid video { aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.video-notes { display: flex; flex-direction: column; gap: 14px; }
.video-notes a { font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--chestnut); line-height: 1.5; }
.video-notes p { margin: 0; }

/* story */
.entry { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(22px, 5vw, 60px); align-items: center; margin-bottom: clamp(48px, 7vw, 84px); }
.entry.flip { grid-template-columns: 7fr 5fr; }
.entry.flip .entry-art { order: 2; }
.entry-art { position: relative; }
.stamp-no {
  position: absolute; z-index: 4; top: -22px; left: -14px; width: 74px; height: 74px; border-radius: 50%;
  background: var(--chestnut); color: #fff; display: grid; place-items: center; font-family: var(--script); font-size: 1.9rem; font-style: italic; font-weight: 700;
  border: 3px dashed #fff4e0; box-shadow: 0 3px 6px rgba(47,33,26,.35); transform: rotate(-10deg);
}
.entry.flip .stamp-no { left: auto; right: -14px; transform: rotate(9deg); }
.quote-note .big { font-family: var(--hand); font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1.1; color: var(--blue); margin: 0; font-weight: 600; }
.quote-note .by { font-family: var(--hand); font-size: 1.3rem; color: var(--ink-soft); margin-top: 8px; display: block; }
.entry-copy h3 { font-family: var(--script); font-style: italic; font-weight: 700; font-size: clamp(1.7rem, 3.6vw, 2.3rem); line-height: 1.1; margin-bottom: 4px; }
.entry-copy .tag { font-family: var(--hand); font-size: 1.6rem; color: var(--chestnut); margin: 0 0 8px; line-height: 1.1; }
.entry-copy p { margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 10px; }
.chips a { font-family: var(--sans); font-size: .95rem; text-decoration: none; background: var(--paper); border: 2px solid var(--chestnut); color: var(--chestnut); padding: 8px 16px; border-radius: 12px 16px 12px 18px; box-shadow: 2px 3px 0 rgba(47,33,26,.3); transform: rotate(-1deg); }
.chips a:hover { background: var(--chestnut); color: #fff; }
.double-polaroids { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.double-polaroids .polaroid:nth-child(1) { transform: rotate(-4deg); }
.double-polaroids .polaroid:nth-child(2) { transform: rotate(3deg) translateY(22px); }

.coming { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 18px; }
.sticky {
  position: relative; padding: 22px 14px 16px; min-height: 150px; box-shadow: 0 6px 12px rgba(47,33,26,.25); font-family: var(--hand);
  font-size: 1.35rem; line-height: 1.05; color: var(--ink);
}
.sticky b { display: block; font-family: var(--script); font-size: 2rem; font-style: italic; margin-bottom: 4px; }
.sticky:nth-child(1) { background: #f7e48d; transform: rotate(-3deg); }
.sticky:nth-child(2) { background: #f4b9c6; transform: rotate(2deg); }
.sticky:nth-child(3) { background: #b9dcb5; transform: rotate(-1.5deg); }
.sticky:nth-child(4) { background: #b5cff0; transform: rotate(2.5deg); }
.sticky:nth-child(5) { background: #f7e48d; transform: rotate(-2deg); }

/* prototype */
.photo-scatter { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(26px, 5vw, 56px); max-width: 860px; margin: 0 auto 60px; }
.photo-scatter .polaroid:nth-child(1) { transform: rotate(-2.5deg); }
.photo-scatter .polaroid:nth-child(2) { transform: rotate(2deg) translateY(18px); }
.photo-scatter .polaroid img { aspect-ratio: auto; object-fit: contain; }
.sheet { position: relative; background: var(--paper); padding: 20px 20px 16px; box-shadow: 0 10px 22px rgba(60,40,25,.25); margin: 0 0 clamp(36px, 6vw, 60px); }
.sheet:nth-of-type(odd) { transform: rotate(-.6deg); } .sheet:nth-of-type(even) { transform: rotate(.5deg); }
.sheet .scroll-x { overflow-x: auto; }
.sheet .scroll-x img { min-width: 640px; width: 100%; }
.sheet figcaption { font-family: var(--sans); font-size: .95rem; line-height: 1.5; padding-top: 10px; color: var(--ink); }
.sheet figcaption b { color: var(--chestnut); }
.mini-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); }
.sub-head { font-family: var(--script); font-style: italic; font-weight: 700; font-size: 2rem; margin: 20px 0 22px; }

/* findings */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 4vw, 44px); margin-bottom: 44px; text-align: center; }
.stat .num {
  display: inline-grid; place-items: center; min-width: 170px; padding: 20px 24px; font-family: var(--script); font-style: italic; font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.4rem); color: var(--chestnut);
  border: 4px solid var(--chestnut); border-radius: 50% 46% 52% 48% / 56% 50% 50% 44%; transform: rotate(-3deg); background: rgba(255,250,240,.55);
}
.stat:nth-child(2) .num { border-radius: 46% 52% 48% 50% / 50% 56% 44% 50%; transform: rotate(2deg); }
.stat:nth-child(3) .num { transform: rotate(-1deg); }
.stat p { margin: 10px auto 0; max-width: 24ch; font-family: var(--sans); font-size: 1rem; line-height: 1.5; color: var(--ink); }
.lined {
  position: relative; background: var(--paper); padding: 22px 28px 20px 62px; box-shadow: 0 8px 18px rgba(60,40,25,.22);
  background-image: repeating-linear-gradient(transparent 0 33px, rgba(70,110,170,.32) 33px 34px); background-position: 0 14px;
}
.lined::before { content: ""; position: absolute; left: 44px; top: 0; bottom: 0; width: 2px; background: rgba(200,70,70,.55); }
.lined h3 { font-family: var(--script); font-style: italic; font-weight: 700; font-size: 1.9rem; margin: 0 0 8px; line-height: 1.2; }
.lined ul { margin: 0; padding-left: 0; list-style: none; }
.lined li { font-family: var(--sans); font-size: 1rem; line-height: 34px; padding-left: 26px; position: relative; }
.lined li::before { content: "\2022"; position: absolute; left: 4px; color: var(--chestnut); }
.lined.l1 { transform: rotate(-.8deg); } .lined.l2 { transform: rotate(.9deg); }
.two-notes { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 4vw, 48px); }

/* team */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 36px); }
.team .polaroid { padding: 12px 12px 92px; }
.team .polaroid img { display: block; }
.team .imogen-portrait { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.team .imogen-portrait img { position: absolute; width: 125%; max-width: none; height: auto; aspect-ratio: auto; left: -12.5%; top: -28%; }
.team .polaroid:nth-child(1) { transform: rotate(-3deg); } .team .polaroid:nth-child(2) { transform: rotate(2deg) translateY(10px); }
.team .polaroid:nth-child(3) { transform: rotate(-1.5deg); } .team .polaroid:nth-child(4) { transform: rotate(3deg) translateY(8px); }
.team .who { position: absolute; left: 10px; right: 10px; bottom: 8px; text-align: center; font-family: var(--hand); line-height: 1.05; }
.team .who b { display: block; font-size: 1.7rem; }
.team .who span { font-family: var(--sans); font-size: .85rem; line-height: 1.4; color: var(--ink-soft); }
.team-sub { font-family: var(--sans); font-size: .85rem; line-height: 1.4; color: var(--ink-soft); text-align: center; display: block; margin-top: 2px; }

/* deliverables */
.notebook { position: relative; background: var(--paper); box-shadow: 0 10px 22px rgba(60,40,25,.25); padding: 24px clamp(14px,3vw,34px) 28px 56px; transform: rotate(-.4deg); }
.notebook::before { content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 14px; background: radial-gradient(circle at 7px 18px, var(--taupe) 6px, transparent 7px) 0 0 / 14px 54px repeat-y; pointer-events: none; }
.file-index { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
.file-assignment-column { width: 7.5rem; }
.file-description-column { width: 34%; }
.file-index th, .file-index td { padding: 10px 18px 10px 0; vertical-align: middle; border-bottom: 1px solid rgba(93,74,62,.18); }
.file-index th:last-child, .file-index td:last-child { padding-right: 0; }
.file-index thead th { padding-bottom: 14px; border-bottom: 2px solid rgba(93,74,62,.35); font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.file-code { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.35rem; color: var(--chestnut); }
.file-title { font-size: .95rem; font-weight: 500; line-height: 1.4; }
.file-links { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; min-width: 0; font-size: .88rem; line-height: 1.5; }
.file-links a { display: inline-flex; align-items: center; min-height: 32px; }
.file-links .soon { color: var(--ink-soft); }
.privacy { font-family: var(--sans); font-size: .85rem; color: var(--ink-soft); margin: 16px 4px 0; }

/* footer */
footer { margin-top: 70px; background: var(--taupe); color: var(--ink); padding: 44px 0 40px; position: relative; }
footer::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 14px; background: radial-gradient(circle at 12px 14px, var(--taupe) 11px, transparent 12px) 0 0 / 24px 14px repeat-x; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 36px; }
footer .brand { color: var(--ink); }
footer p { margin: 0; font-family: var(--sans); font-size: .9rem; line-height: 1.5; }
.course-credit { display: inline-block; margin-bottom: 5px; font-weight: 600; color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-copy { max-width: 580px; }
  .index-cards, .stats, .two-notes, .mini-row { grid-template-columns: 1fr; }
  .video-spread, .entry, .entry.flip { grid-template-columns: 1fr; }
  .entry.flip .entry-art { order: 0; }
  .team { grid-template-columns: 1fr 1fr; }
  .coming { grid-template-columns: repeat(2, 1fr); }
  .photo-scatter { grid-template-columns: 1fr; max-width: 420px; }
}
@media (max-width: 620px) {
  .site-nav .wrap { flex-direction: column; align-items: flex-start; padding: 6px 0; gap: 0; }
  .nav-links { justify-content: flex-start; gap: 0 12px; }
  .nav-links a { font-size: .82rem; }
  .hero h1 { grid-column: 1; font-size: clamp(2.8rem, 10vw, 3.8rem); }
  .hero-grid { grid-template-columns: minmax(0,1fr) 88px; gap: 20px; }
  .hero-copy { display: contents; }
  .hero .stampy-happy { grid-column: 2; grid-row: 1; width: 100%; }
  .hero .sub { grid-column: 1 / -1; margin-top: 0; }
  .hero .hero-cta { grid-column: 1 / -1; justify-self: center; margin-top: 4px; }
  .notebook { padding: 18px 14px 22px 40px; }
  .notebook::before { left: 12px; }
  .file-assignment-column { width: 5.1rem; }
  .file-description-column { width: 33%; }
  .file-index th, .file-index td { padding: 12px 10px 12px 0; }
  .file-index thead th { font-size: .72rem; }
  .file-title { font-size: .83rem; }
  .file-links { gap: 0 12px; font-size: .8rem; overflow-wrap: anywhere; }
  .file-links a { min-height: 44px; }
  .team { grid-template-columns: 1fr; max-width: 300px; margin-inline: auto; }
  .tape { width: 84px; }
  .lined { padding-left: 52px; }
  .lined::before { left: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; } .sticker { transition: none; }
}

@media (max-width: 900px) {
  .stamp-no, .entry.flip .stamp-no { left: -6px; right: auto; top: -26px; }
}

html { overflow-x: clip; }
@media (max-width: 620px) {
  .tape.tl { left: -8px; } .tape.tr { right: -8px; }
}

.mini-row { align-items: start; }
