/* Jonestopia — jonestopia.com
   Hand-coded from the "Cabin Studio" design. No frameworks, no third-party requests. */

/* ---------- Fonts (self-hosted, latin subsets, SIL Open Font License) ---------- */
@font-face {
  font-family: 'Young Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/young-serif-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/nunito-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(assets/fonts/caveat-latin.woff2) format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --ink: #33211A;
  --muted: #6B564A;
  --paper: #F7EEDC;
  --paper-light: #FCF6E9;
  --note: #FBEFC6;
  --honey: #F0DDB6;
  --honey-line: #E3C99A;
  --cork: #C9925A;
  --oak: #8B5A2B;
  --oak-light: #D9A05B;
  --walnut: #3A2416;
  --sea: #2A6FA8;
  --sea-dark: #1F547F;
  --rust: #C1502C;
  --rust-text: #A8401F;
  --gold: #F2BE4C;
  --gold-dark: #B8862B;
  --cream: #F7EEDC;
  --cream-muted: #D9C9B3;

  --font-display: 'Young Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Nunito', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Bradley Hand', 'Segoe Print', cursive;

  --shadow-paper: 0 12px 26px rgba(58, 36, 22, 0.28);
  --shadow-frame: 0 26px 48px rgba(58, 36, 22, 0.30);

  --gutter: clamp(24px, 6vw, 120px);
  --content: 1200px;
  --section-y: clamp(64px, 8vw, 112px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--sea); }
a:hover { color: var(--sea-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.container {
  width: min(var(--content), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: absolute; left: 16px; top: -100px;
  padding: 10px 14px; background: var(--ink); color: var(--cream);
  border-radius: 8px; font-weight: 700; z-index: 100;
}
.skip-link:focus { top: 16px; }

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  text-wrap: balance;
}
.display--xl { font-size: clamp(42px, 4.8vw, 68px); line-height: 1.05; }
.display--lg { font-size: clamp(32px, 3.4vw, 48px); }
.display--md { font-size: clamp(30px, 2.8vw, 42px); }
.display--sm { font-size: clamp(24px, 1.9vw, 27px); line-height: 1.2; }

.hand {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(23px, 1.8vw, 26px);
  line-height: 1.15;
}
.hand--rust { color: var(--rust-text); }
.hand--gold { color: var(--gold); }
.hand--big { font-size: 28px; line-height: 1.1; }
.hand--num { font-size: clamp(34px, 2.8vw, 40px); line-height: 1; color: var(--rust-text); }
.hand--sig { font-size: clamp(30px, 2.2vw, 32px); line-height: 1; }

.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.lede--light { color: var(--cream-muted); }
.muted { color: var(--muted); line-height: 1.6; text-wrap: pretty; }
.eyebrow {
  font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.accent { color: var(--sea); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 28px; border-radius: 14px;
  font-weight: 800; font-size: 18px; line-height: 1; text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 transparent; }
.btn--sea { background: var(--sea); color: #fff; box-shadow: 0 4px 0 var(--sea-dark); }
.btn--sea:hover { color: #fff; background: #2B76B3; }
.btn--small { padding: 12px 22px; border-radius: 12px; font-size: 17px; font-weight: 700; box-shadow: 0 3px 0 var(--sea-dark); }

.link-underline {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 800; font-size: 18px; text-decoration: none;
  border-bottom: 2px solid var(--oak-light); padding-bottom: 2px;
}
.link-underline:hover { color: var(--ink); border-color: var(--oak); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; padding-top: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(58, 36, 22, 0.12);
}
.site-header__inner {
  height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand__name { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.01em; }
.site-nav { display: flex; align-items: center; gap: 36px; font-weight: 700; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--sea-dark); }
.nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 0; padding: 0; color: var(--ink); cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(56px, 6vw, 80px);
  background:
    radial-gradient(circle at 12% 22%, rgba(242, 190, 76, 0.30), rgba(242, 190, 76, 0) 42%),
    var(--paper);
}
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 640px);
  align-items: center; gap: clamp(32px, 4vw, 56px);
}
.hero__copy { display: flex; flex-direction: column; gap: 26px; max-width: 580px; }
.hero__art { position: relative; padding: 18px 16px 44px 20px; }

.frame {
  background: var(--oak-light);
  padding: 4px;
  border: 12px solid var(--oak);
  border-radius: 6px;
  box-shadow: var(--shadow-frame);
}
.frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.frame--small { border-width: 10px; padding: 3px; box-shadow: 0 16px 30px rgba(58, 36, 22, 0.24); }
.frame--small img { aspect-ratio: 1 / 1; }

/* Notes: pinned paper */
.note {
  position: relative;
  background: var(--note);
  box-shadow: var(--shadow-paper);
  padding: 40px 32px 34px;
  display: flex; flex-direction: column; gap: 16px;
}
.note--paper { background: var(--paper-light); }
.note::before {
  content: ""; position: absolute; top: -8px; left: 50%; margin-left: -8px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--rust);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35), inset -3px -3px 0 rgba(0, 0, 0, 0.2);
}
.pin-sea::before { background: var(--sea); }
.pin-gold::before { background: var(--gold); }
.pin-two::before { left: 22px; margin-left: 0; background: var(--sea); }
.pin-two::after {
  content: ""; position: absolute; top: -8px; right: 22px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--rust);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35), inset -3px -3px 0 rgba(0, 0, 0, 0.2);
}

.tilt-l { transform: rotate(-1.2deg); }
.tilt-l-soft { transform: rotate(-0.7deg); }
.tilt-l-2 { transform: rotate(-2deg); }
.tilt-r { transform: rotate(1.4deg); }

.note--hero {
  position: absolute; left: 0; bottom: 0; width: 228px;
  padding: 26px 22px 18px; gap: 6px;
  transform: rotate(3deg);
}
.heart { display: block; }

/* ---------- Bookshelf ---------- */
.shelf { background: var(--honey); padding-top: clamp(48px, 5vw, 64px); padding-bottom: 48px; }
.shelf__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
.shelf__copy { display: flex; flex-direction: column; gap: 10px; padding-bottom: 28px; max-width: 320px; }
.books { display: flex; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.book {
  width: var(--w); height: var(--h);
  display: flex; align-items: center; justify-content: center;
  background: var(--c); color: var(--note);
  border-radius: 3px 3px 2px 2px;
  box-shadow: inset -6px 0 0 rgba(0, 0, 0, 0.14), inset 2px 0 0 rgba(255, 255, 255, 0.14);
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 15px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap;
}
.book--light { color: var(--ink); }
.plank {
  height: 20px; border-radius: 3px;
  background: linear-gradient(var(--oak-light) 0%, #B8783A 30%, var(--oak) 100%);
  box-shadow: 0 8px 14px rgba(58, 36, 22, 0.28);
}

/* ---------- Pinboard ---------- */
.pinboard {
  padding-block: clamp(64px, 7vw, 96px) clamp(72px, 7.5vw, 104px);
  border-top: 14px solid var(--oak);
  border-bottom: 14px solid var(--oak);
  background-color: var(--cork);
  background-image: radial-gradient(rgba(92, 52, 20, 0.22) 1.2px, transparent 1.7px);
  background-size: 7px 7px;
}
.pinboard__inner { display: flex; flex-direction: column; gap: clamp(40px, 5vw, 64px); }
.banner { align-self: flex-start; max-width: 820px; padding: 36px 44px; gap: 14px; }
.notes-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px; align-items: start;
}
.notes-grid__lower { margin-top: 18px; }

/* ---------- Apps ---------- */
.apps { background: var(--paper-light); padding-block: var(--section-y); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-bottom: clamp(36px, 4vw, 56px); }
.app-card {
  display: grid; grid-template-columns: 320px minmax(0, 1fr) 236px;
  align-items: center; gap: 44px;
  padding: 40px 44px;
  background: var(--paper);
  border: 2px solid var(--honey-line);
  border-radius: 22px;
  box-shadow: 0 22px 48px rgba(58, 36, 22, 0.14);
}
.app-card__copy { display: flex; flex-direction: column; gap: 18px; }
.checklist { padding: 30px 24px 24px; gap: 12px; }
.checklist li {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-hand); font-weight: 700; font-size: 25px; line-height: 1;
}

/* ---------- About ---------- */
.about { background: var(--honey); padding-block: var(--section-y); }
.about__inner { display: grid; grid-template-columns: 420px minmax(0, 1fr); align-items: center; gap: clamp(40px, 6vw, 96px); }
.polaroid { padding: 16px 16px 20px; gap: 14px; }
.polaroid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.polaroid figcaption { text-align: center; }
.about__copy { display: flex; flex-direction: column; gap: 22px; max-width: 640px; }

/* ---------- Lantern (footer) ---------- */
.lantern {
  color: var(--cream);
  padding-block: clamp(56px, 6vw, 72px) 44px;
  border-top: 14px solid var(--oak);
  background:
    radial-gradient(circle at 84% 30%, rgba(242, 190, 76, 0.40), rgba(242, 190, 76, 0) 44%),
    var(--walnut);
}
.site-footer {
  display: flex; flex-direction: column; gap: 32px;
  font-size: 15px; color: var(--cream-muted);
}
.acknowledgement { display: flex; flex-direction: column; gap: 10px; max-width: 880px; }
.acknowledgement .hand { font-size: 24px; }
.acknowledgement p:last-child { font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.site-footer__row {
  display: flex; justify-content: space-between; align-items: center; gap: 20px 32px; flex-wrap: wrap;
  padding-top: 28px; border-top: 1px solid rgba(247, 238, 220, 0.18);
}
.site-footer__legal { display: flex; align-items: center; gap: 12px; }
.site-footer__mark { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; }
.site-footer__legal a { color: var(--cream); text-decoration: none; border-bottom: 1px solid rgba(247, 238, 220, 0.4); }
.site-footer__legal a:hover { color: #fff; border-color: #fff; }
.site-footer__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.site-footer__nav a { color: var(--cream); text-decoration: none; }
.site-footer__nav a:hover { color: #fff; text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .app-card { grid-template-columns: 260px minmax(0, 1fr); }
  .app-card__note { grid-column: 1 / -1; width: 236px; }
  .about__inner { grid-template-columns: 340px minmax(0, 1fr); }
}

@media (max-width: 1023px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__art { max-width: 640px; }
  .shelf__inner { flex-direction: column; align-items: stretch; gap: 24px; }
  .shelf__copy { padding-bottom: 0; }
  .books { justify-content: space-between; }
  .book { flex: 1 1 0; min-width: 0; }
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notes-grid__lower { margin-top: 0; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header__inner { height: 72px; }
  .brand__name { font-size: 23px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper-light); border-bottom: 1px solid rgba(58, 36, 22, 0.12);
    box-shadow: 0 18px 30px rgba(58, 36, 22, 0.18);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 16px var(--gutter); border-top: 1px solid rgba(58, 36, 22, 0.08); }

  .hero__copy { gap: 22px; }
  .hero__art { padding: 12px 8px 60px 12px; }
  .frame { border-width: 10px; padding: 3px; }
  .note--hero { width: 186px; padding: 22px 18px 14px; }
  .note--hero .hand--big { font-size: 23px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
  .link-underline { justify-content: center; border-bottom: 0; padding: 12px 0; }

  .book:nth-child(n + 7) { display: none; }
  .book { font-size: 13px; }
  .plank { height: 16px; }

  .pinboard { border-width: 12px; }
  .banner { padding: 30px 24px 26px; }
  .notes-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .note { padding: 34px 26px 28px; gap: 12px; }

  .app-card { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 22px 28px; border-radius: 20px; }
  .app-card__art { width: min(262px, 100%); margin-inline: auto; }
  .app-card__note { width: 232px; }
  .checklist li { font-size: 24px; }

  .about__inner { grid-template-columns: minmax(0, 1fr); }
  .polaroid { width: min(330px, 100%); margin-inline: auto; padding: 14px 14px 16px; }

  .lantern { border-width: 12px; padding-bottom: 32px; }
  .site-footer { gap: 24px; font-size: 14px; }
  .site-footer__row { padding-top: 22px; }
  .site-footer__legal { align-items: flex-start; }
}
