/* Better StudyPlace Documentation & Showcase
   Shared Option C Design System ("page-is-the-object" · Archival Campus Manual)
*/

:root {
  --bg: #e2d9c6;
  --surface: #d5cab4;
  --paper: #f2f2f0;
  --ink: #062b8a;
  --muted: #29468d;
  --accent: #062b8a;
  --accent-ink: #f2f2f0;
  --field-green: #133621;
  --field-ink: #f2f2f0;
  --field-gold: #f0d365;

  --font-display: "Erode", Georgia, "Times New Roman", serif;
  --font-text: "Erode", Georgia, "Times New Roman", serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;

  --step-small: clamp(0.875rem, 0.84rem + 0.14vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.65vw, 1.5625rem);
  --step-head: clamp(1.85rem, 1.35rem + 2.4vw, 3.15rem);
  --step-display: clamp(2.5rem, 1.65rem + 4.1vw, 4.75rem);

  --margin: clamp(1rem, 2.5vw, 2.5rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; background: var(--surface); }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 5.5rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  text-wrap: balance;
  hyphens: none;
}

.wrap {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--margin);
}

.small { font-size: var(--step-small); line-height: 1.45; }
.lead { font-size: var(--step-lead); line-height: 1.38; max-width: 44ch; }
.head { font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.025em; }
.display { font-size: var(--step-display); line-height: 0.98; letter-spacing: -0.03em; }
.muted { color: var(--muted); }
.nums { font-variant-numeric: tabular-nums; }
p { max-width: 62ch; text-wrap: pretty; }
p + p { margin-top: 0.85em; }

code, kbd {
  font-family: var(--font-ui);
  font-size: 0.88em;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink);
  padding: 0.12em 0.45em;
}
kbd {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Buttons & Links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.4rem;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  font-size: var(--step-small);
  transition: transform 140ms var(--ease-out), opacity 180ms ease;
}
.button:active { transform: scale(0.97); }
.button--paper {
  background: var(--paper);
  color: var(--ink);
}

.link-plain {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
  transition: opacity 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .button:hover { opacity: 0.92; }
  .link-plain:hover { opacity: 0.72; }
}

/* ---------- Shared Minimal Navigation (Only Overview & Guide & Tutorials) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 4.5rem;
  padding-block: 0.65rem;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--step-body);
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-link img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  flex-shrink: 0;
  background: transparent;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: var(--step-small);
  font-weight: 500;
  padding: 0.45rem 0.25rem;
  white-space: nowrap;
}
.nav-links a[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 0.12em;
}
@media (max-width: 680px) {
  .site-nav {
    flex-wrap: wrap;
    row-gap: 0.45rem;
  }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 1.5rem;
    padding-bottom: 0.25rem;
  }
}

/* ---------- Framed Screenshot Presentation ---------- */
.shot-frame {
  background: var(--paper);
  padding: 0.55rem;
}
.shot-frame img {
  width: 100%;
  display: block;
}
.shot-caption {
  font-size: var(--step-small);
  color: var(--muted);
  margin-top: 0.65rem;
}

/* ---------- Shared Postcard-Back Footer ---------- */
.site-footer {
  background: var(--field-green);
  padding-block: 3.5rem 2.5rem;
}
.postcard-back {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(2.8rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem) 2rem;
  clip-path: polygon(
    0% 18px, 4.16% 0px, 8.33% 18px, 12.5% 0px, 16.66% 18px, 20.83% 0px,
    25% 18px, 29.16% 0px, 33.33% 18px, 37.5% 0px, 41.66% 18px, 45.83% 0px,
    50% 18px, 54.16% 0px, 58.33% 18px, 62.5% 0px, 66.66% 18px, 70.83% 0px,
    75% 18px, 79.16% 0px, 83.33% 18px, 87.5% 0px, 91.66% 18px, 95.83% 0px,
    100% 18px, 100% 100%, 0% 100%
  );
}
.postcard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}
.postcard-signoff {
  font-size: clamp(1.65rem, 2.4vw, 2.1rem);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 0.9rem;
}
.postcard-right {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}
.postcard-address {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: var(--step-body);
}
.postcard-address a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.06em;
}
.postcard-stamp {
  width: 92px;
  flex-shrink: 0;
  background: var(--bg);
  padding: 9px;
  text-align: center;
}
.postcard-stamp img {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  margin-inline: auto;
  background: transparent;
}
.postcard-stamp-caption {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}
.postcard-imprint {
  margin-top: 2.5rem;
  text-align: center;
  font-size: var(--step-small);
  color: var(--muted);
}
@media (max-width: 768px) {
  .postcard-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .postcard-back {
    padding-top: 3rem;
  }
}
