@import "tailwindcss";

:root {
  --paper: #f5eedc;
  --card: #fff9ed;
  --ink: #182a2a;
  --rust: #c85d43;
  --rust-dark: #a84430;
  --sage: #91a58b;
  --mustard: #d7a735;
  --rule: rgba(24, 42, 42, 0.22);
  --font-fraunces: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-dm-sans: "Avenir Next", Avenir, "Trebuchet MS", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 20%, rgba(200, 93, 67, 0.035), transparent 28%),
    radial-gradient(circle at 82% 70%, rgba(145, 165, 139, 0.06), transparent 32%),
    var(--paper);
  font-family: var(--font-dm-sans), "Trebuchet MS", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.26;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

a { color: inherit; text-decoration: none; }
button, select { font: inherit; }

.site-header {
  min-height: 88px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-fraunces), Georgia, serif;
  font-size: clamp(25px, 2.4vw, 38px);
  font-weight: 650;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.brand-ai {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 58px;
  font-size: 42px;
  letter-spacing: -0.08em;
}

.brand-ai::before {
  content: "";
  position: absolute;
  inset: 1px -2px 3px;
  border: 3px solid var(--rust);
  border-radius: 50% 47% 52% 48%;
  transform: rotate(-7deg);
}

.brand-ai::after {
  content: "";
  position: absolute;
  height: 3px;
  width: 56px;
  bottom: -3px;
  left: 5px;
  background: var(--rust);
  transform: rotate(-4deg);
  border-radius: 99px;
}

nav { display: flex; align-items: center; gap: clamp(22px, 3vw, 46px); }
nav a { position: relative; font-size: 15px; font-weight: 600; white-space: nowrap; }
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -14px;
  width: 0;
  height: 3px;
  background: var(--mustard);
  border-radius: 90% 10% 70% 20%;
  transform: rotate(-1deg);
  transition: width 180ms ease;
}
nav a:hover::after, nav a:focus-visible::after, nav a.active::after { width: 100%; }

.hero {
  max-width: 1440px;
  min-height: 745px;
  margin: 0 auto;
  padding: 60px 64px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(500px, .97fr);
  gap: 54px;
  align-items: center;
  overflow: hidden;
  border-bottom: 4px double rgba(24, 42, 42, .7);
}

.hero-copy { padding-bottom: 12px; }
.eyebrow {
  margin: 0 0 22px;
  color: var(--rust-dark);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 14px;
  font-weight: 800;
}

h1, h2 { font-family: var(--font-fraunces), Georgia, serif; }
h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(58px, 5vw, 76px);
  line-height: .99;
  letter-spacing: -.045em;
  font-weight: 650;
}

h1 span { position: relative; display: inline; }
h1 span::after {
  content: "";
  position: absolute;
  left: -1%; right: -1%; bottom: -8px;
  height: 12px;
  z-index: -1;
  background: var(--sage);
  opacity: .78;
  clip-path: polygon(0 40%, 100% 4%, 97% 77%, 4% 100%);
}

.hero-subhead {
  max-width: 560px;
  margin: 30px 0 0;
  font-size: 21px;
  line-height: 1.48;
}

.featured-strip {
  position: relative;
  width: min(100%, 530px);
  min-height: 72px;
  margin-top: 30px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #743623;
  background: #e7be55;
  box-shadow: 0 9px 18px rgba(71, 50, 29, .16);
  clip-path: polygon(1% 5%, 98% 0, 100% 93%, 2% 100%, 0 49%);
  transform: rotate(-.4deg);
  transition: transform 180ms ease;
}
.featured-strip:hover { transform: rotate(-.4deg) translateY(-3px); }
.featured-strip span:nth-child(2) { flex: 1; }
.book-mark { font-family: Georgia, serif; font-size: 32px; transform: rotate(5deg); }

.explainer-stage { position: relative; min-height: 610px; display: flex; align-items: center; }
.illustration-space {
  position: absolute;
  z-index: 0;
  width: 330px;
  height: 620px;
  right: -80px;
  top: -10px;
  background-image: url('/fishing-server-production.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: right center;
  opacity: .92;
}

.explainer-card {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  padding: 34px 36px 36px;
  background: rgba(255, 249, 237, .94);
  border: 2px solid var(--ink);
  border-radius: 20px;
  box-shadow: 14px 15px 0 var(--rust);
  animation: rise-in 420ms ease-out both;
}
.explainer-card h2 { margin: 0 0 24px; font-size: 42px; line-height: 1; letter-spacing: -.035em; }
.explainer-card label, .explainer-card legend { font-size: 16px; font-weight: 650; }
.select-wrap { position: relative; margin-top: 10px; }
.select-wrap::after { content: "⌄"; position: absolute; right: 19px; top: 12px; font-size: 27px; pointer-events: none; }
select {
  width: 100%; height: 60px; padding: 0 50px 0 18px;
  color: var(--ink); background: transparent; border: 2px solid var(--ink); border-radius: 12px;
  appearance: none; cursor: pointer;
}
fieldset { padding: 0; margin: 22px 0 0; border: 0; }
legend { margin-bottom: 12px; }
.hobby-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hobby {
  min-height: 64px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  background: rgba(255,255,255,.12);
  border: 2px solid var(--ink);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}
.hobby:hover { transform: translateY(-2px); box-shadow: 0 4px 0 rgba(24,42,42,.18); }
.hobby.selected { color: var(--card); background: var(--rust); border-color: var(--rust-dark); }
.hobby-mark { min-width: 23px; font-family: Georgia, serif; font-size: 26px; line-height: 1; }
.explain-button {
  width: 100%; min-height: 66px; margin-top: 24px; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--card); background: var(--rust); border: 2px solid var(--rust-dark); border-radius: 14px;
  font-size: 20px; font-weight: 800; cursor: pointer; transition: transform 180ms ease, background 180ms ease;
}
.explain-button:hover { background: var(--rust-dark); transform: translateY(-2px); }

.quick-result {
  display: none;
  max-width: 900px;
  margin: 0 auto;
  padding: 90px 48px;
  scroll-margin-top: 30px;
}
.quick-result.visible { display: block; animation: rise-in 360ms ease-out both; }
.quick-result h2 { margin: 0 0 18px; font-size: clamp(42px, 5vw, 66px); letter-spacing: -.035em; }
.quick-result > p:not(.eyebrow) { font-size: 20px; line-height: 1.7; }
.result-note { margin-top: 28px; padding: 20px 24px; border-left: 5px solid var(--mustard); background: rgba(255,249,237,.6); }

.term-table {
  margin-top: 50px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.term-head, .term-row {
  display: grid;
  grid-template-columns: .65fr 1fr 1.3fr;
  gap: 22px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.term-head {
  color: var(--card);
  background: var(--ink);
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: 11px;
  font-weight: 800;
}
.term-row:last-child { border-bottom: 0; }
.term-row span { line-height: 1.5; }
.analogy-footnotes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 34px; }
.analogy-footnotes article { padding: 26px; border: 1px solid var(--rule); background: rgba(255,249,237,.5); }
.analogy-footnotes .eyebrow { margin-bottom: 14px; }
.analogy-footnotes p:last-child { margin: 0; font-size: 16px; line-height: 1.65; }
.analogy-footnotes .try-it { background: rgba(215,167,53,.16); transform: rotate(.25deg); }
.dynamic-source {
  margin-top: 24px;
  padding: 16px 4px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--rust-dark);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-weight: 800;
}
.dynamic-source:hover { color: var(--ink); }

.plain-section, .series-section, .dictionary-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 100px 64px;
}
.section-intro { max-width: 900px; }
.section-intro h2, .dictionary-intro h2, .questions-heading h2, .sources-section h2 {
  margin: 0;
  font-size: clamp(43px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -.04em;
}
.section-intro > p:last-child, .dictionary-intro > p:last-child, .questions-heading > p:last-child {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: 20px;
  line-height: 1.65;
}

.stakes { border-bottom: 1px solid var(--rule); }
.balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 58px; }
.balance-grid article {
  position: relative;
  min-height: 310px;
  padding: 44px 38px 34px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 4px;
}
.balance-grid article:first-child { transform: rotate(-.35deg); box-shadow: -8px 9px 0 var(--sage); }
.balance-grid article:last-child { transform: rotate(.35deg); box-shadow: 8px 9px 0 var(--rust); }
.scribble-label {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 12px;
  font-weight: 800;
  transform: rotate(-1deg);
}
.sage-label { background: rgba(145,165,139,.55); }
.rust-label { background: rgba(200,93,67,.28); }
.balance-grid ul { margin: 6px 0 0; padding-left: 22px; }
.balance-grid li { margin: 13px 0; padding-left: 5px; font-size: 17px; line-height: 1.5; }

.dictionary-section {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 72px;
  background: var(--ink);
  color: var(--paper);
  max-width: none;
  padding-left: max(64px, calc((100vw - 1312px) / 2));
  padding-right: max(64px, calc((100vw - 1312px) / 2));
}
.dictionary-section .eyebrow { color: #edb998; }
.dictionary-grid { margin: 0; }
.dictionary-grid div { display: grid; grid-template-columns: 145px 1fr; gap: 24px; padding: 16px 0; border-bottom: 1px solid rgba(245,238,220,.2); }
.dictionary-grid dt { font-family: var(--font-fraunces); font-size: 23px; font-weight: 700; }
.dictionary-grid dd { margin: 0; color: rgba(245,238,220,.78); line-height: 1.55; }
.dictionary-grid dd span {
  display: block;
  margin-bottom: 4px;
  color: #efbf62;
  font-size: 13px;
  font-weight: 800;
}

.questions-section {
  padding: 110px max(64px, calc((100vw - 1312px) / 2));
  background: #e4c35f;
  color: var(--ink);
}
.questions-heading { max-width: 880px; }
.question-list { max-width: 1020px; margin: 60px 0 0 auto; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.question-list li { display: grid; grid-template-columns: 70px 1fr; gap: 18px; align-items: start; padding: 21px 0; border-bottom: 1px solid rgba(24,42,42,.4); }
.question-list span { color: var(--rust-dark); font-family: var(--font-fraunces); font-size: 21px; font-weight: 700; }
.question-list p { margin: 0; font-size: 20px; line-height: 1.45; }
.local-note { max-width: 760px; margin: 40px 0 0 auto; padding: 18px 22px; border: 1px solid rgba(24,42,42,.45); font-size: 14px; line-height: 1.55; }

.series-section { border-bottom: 1px solid var(--rule); }
.series-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 24px; margin-top: 54px; }
.series-card {
  min-height: 360px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  background: rgba(255,249,237,.5);
  border: 2px solid var(--ink);
  border-radius: 3px;
}
.series-card > span, .series-card small { text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; }
.series-card h3 { margin: 22px 0 14px; font-family: var(--font-fraunces); font-size: 35px; line-height: 1.02; letter-spacing: -.035em; }
.series-card p { margin: 0; font-size: 16px; line-height: 1.65; }
.series-card a, .series-card small { margin-top: auto; padding-top: 30px; }
.series-card a { color: var(--rust-dark); font-weight: 800; }
.series-card.featured-book { color: var(--card); background: var(--rust); box-shadow: 9px 10px 0 var(--mustard); transform: rotate(-.4deg); }
.series-card.featured-book a { color: var(--card); }

.sources-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 90px 64px;
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 80px;
  align-items: start;
}
.sources-section h2 { font-size: clamp(40px,4vw,58px); }
.source-links { border-top: 2px solid var(--ink); }
.source-links a { display: flex; justify-content: space-between; gap: 20px; padding: 19px 4px; border-bottom: 1px solid var(--rule); font-weight: 700; }
.source-links a:hover { color: var(--rust-dark); }

.featured-local-section {
  max-width: 1312px;
  margin: 10px auto 100px;
  padding: 50px 54px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  color: var(--card);
  background: var(--rust);
  border: 2px solid var(--ink);
  box-shadow: 12px 13px 0 var(--mustard);
  transform: rotate(-.25deg);
}
.featured-local-section h2 {
  margin: 0;
  font-family: var(--font-fraunces);
  font-size: clamp(40px, 4.5vw, 62px);
  line-height: 1;
  letter-spacing: -.04em;
}
.featured-local-section .eyebrow { color: #ffd98a; }
.featured-local-section p:last-child { max-width: 780px; margin: 20px 0 0; font-size: 17px; line-height: 1.65; }
.featured-local-button, .featured-local-current {
  max-width: 290px;
  padding: 18px 20px;
  color: var(--ink);
  background: var(--mustard);
  border: 2px solid var(--ink);
  border-radius: 4px;
  font-weight: 850;
  line-height: 1.35;
}
.featured-local-button { cursor: pointer; transition: transform 180ms ease, background 180ms ease; }
.featured-local-button:hover { transform: translateY(-3px); background: #efc95f; }
.featured-local-current { display: inline-block; background: var(--card); }

footer {
  padding: 58px max(64px, calc((100vw - 1312px) / 2));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 40px;
  align-items: center;
  color: var(--paper);
  background: var(--ink);
}
.footer-brand { grid-row: span 2; }
footer p { margin: 0; color: rgba(245,238,220,.7); }
footer > a { color: #efbf62; font-weight: 800; }

button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }

@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1080px) {
  .site-header { padding: 0 32px; }
  nav { gap: 18px; }
  .hero { padding: 50px 32px; grid-template-columns: 1fr 500px; gap: 28px; }
  h1 { font-size: 58px; }
  .illustration-space { opacity: .32; right: -28px; }
}

@media (max-width: 900px) {
  .site-header { min-height: 80px; }
  nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 52px; }
  .hero-copy { max-width: 720px; }
  h1 { font-size: clamp(50px, 9vw, 68px); }
  .explainer-stage { min-height: 560px; }
  .explainer-card { margin: 0 auto; }
  .illustration-space { right: 0; }
  .dictionary-section, .sources-section { grid-template-columns: 1fr; gap: 44px; }
  .featured-local-section { margin: 10px 32px 80px; grid-template-columns: 1fr; }
  .series-grid { grid-template-columns: 1fr; }
  .series-card { min-height: 300px; }
  footer { grid-template-columns: 1fr; }
  .footer-brand { grid-row: auto; margin-bottom: 18px; }
}

@media (max-width: 620px) {
  .site-header { padding: 0 22px; }
  .brand { font-size: 25px; }
  .brand-ai { width: 49px; height: 48px; font-size: 33px; }
  .brand-ai::after { width: 44px; }
  .hero { padding: 42px 22px 52px; }
  h1 { font-size: clamp(46px, 13.5vw, 58px); }
  .hero-subhead { font-size: 18px; }
  .featured-strip { font-size: 14px; }
  .explainer-stage { min-height: 610px; margin-top: 18px; }
  .explainer-card { padding: 27px 23px 28px; box-shadow: 8px 10px 0 var(--rust); }
  .explainer-card h2 { font-size: 36px; }
  .hobby-grid { grid-template-columns: repeat(2, 1fr); }
  .hobby { min-height: 58px; }
  .illustration-space { display: none; }
  .quick-result { padding: 70px 24px; }
  .term-head { display: none; }
  .term-row { grid-template-columns: 1fr; gap: 8px; padding: 19px 4px; }
  .term-row strong { color: var(--rust-dark); font-size: 20px; }
  .term-row span:last-child { padding-top: 7px; border-top: 1px dashed var(--rule); }
  .analogy-footnotes { grid-template-columns: 1fr; }
  .plain-section, .series-section, .dictionary-section, .sources-section { padding: 76px 24px; }
  .balance-grid { grid-template-columns: 1fr; }
  .dictionary-section { padding-left: 24px; padding-right: 24px; }
  .dictionary-grid div { grid-template-columns: 1fr; gap: 6px; }
  .questions-section { padding: 80px 24px; }
  .question-list li { grid-template-columns: 44px 1fr; gap: 10px; }
  .question-list p { font-size: 17px; }
  .featured-local-section { margin: 0 24px 70px; padding: 38px 28px; gap: 28px; }
  .featured-local-button, .featured-local-current { max-width: none; width: 100%; }
  footer { padding: 52px 24px; }
  .footer-brand { font-size: 24px; }
}

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

