/* LJ Matters — shared styles */
@import url('https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,300..800;1,7..72,300..800&display=swap');

:root {
  --paper: #F5F7F2;
  --paper-deep: #E8EEE6;
  --ink: #25332B;
  --ink-soft: #4A5A50;
  --sage: #7E9B84;
  --blue: #5F7F99;
  --sun: #E9C46A;
  --line: #D3DCD1;
  --measure: 66ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Literata', Georgia, 'Times New Roman', serif;
  font-optical-sizing: auto;
  font-size: 1.125rem;
  line-height: 1.7;
}

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Layout */
.wrap {
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header {
  padding: 1.5rem 0;
}
.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-nav a {
  margin-left: 1.25rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

main section { padding: 3.5rem 0; border-top: 1px solid var(--line); }
main section:first-child { border-top: 0; }

h1, h2, h3 { line-height: 1.15; font-weight: 600; margin: 0 0 1rem; }
h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1rem; max-width: var(--measure); }
.lede { font-size: clamp(1.2rem, 2.6vw, 1.45rem); color: var(--ink-soft); font-weight: 400; }
.small { font-size: 0.92rem; color: var(--ink-soft); }

ul.plain { padding-left: 1.2rem; max-width: var(--measure); }
ul.plain li { margin-bottom: 0.5rem; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  display: inline-block;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--ink);
  line-height: 1.2;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--paper-deep); color: var(--ink); }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* Hero: the sunrise over a horizon line */
.hero { padding: 2.5rem 0 4rem; }
.horizon {
  position: relative;
  height: clamp(90px, 16vw, 150px);
  margin-bottom: 2.25rem;
  overflow: hidden;
}
.horizon::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--ink);
}
.sun {
  position: absolute;
  bottom: -55%;
  left: 12%;
  width: clamp(120px, 22vw, 210px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  animation: rise 2.4s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes rise {
  from { transform: translateY(45%); opacity: 0.6; }
  to   { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sun { animation: none; }
}
.subtitle {
  display: block;
  font-size: clamp(1.25rem, 3.2vw, 1.7rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  margin-top: 0.6rem;
  color: var(--ink-soft);
}

/* Workbook highlight band */
.band {
  background: var(--paper-deep);
  border-top: 0 !important;
}

/* Form area */
.form-slot {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 2px dashed var(--sage);
  border-radius: 12px;
  background: #fff;
  max-width: var(--measure);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.site-footer a { color: var(--ink-soft); }
.site-footer p { margin-bottom: 0.4rem; }

@media (max-width: 520px) {
  .site-nav a { margin: 0 1rem 0 0; }
  body { font-size: 1.06rem; }
}
