/* =============================================================
   First Dollar School, global stylesheet
   Greenback palette, premium institutional. v1 launch.
   ============================================================= */

/* ---- tokens --------------------------------------------------- */
:root {
  /* primary palette */
  --cream:        #F5EFE3;
  --ink:          #1A1814;
  --greenback:    #2D4F3F;
  --brass:        #A8884A;

  /* supporting */
  --ink-10:       #E2DDD2;
  --ink-70:       #4D4A44;
  --greenback-deep:#1F3A2D;
  --brass-light:  #D4B670;
  --brick:        #8C3A2A;

  /* type families, spec-approved open-source fallbacks
     (Source Serif 4 for display + body, Inter for UI, JetBrains Mono for tabular) */
  --serif-display: "Source Serif 4", "GT Sectra Display", "Tiempos Headline", "Caslon Pro", Garamond, Georgia, serif;
  --serif-body:    "Source Serif 4", "Tiempos Text", "Source Serif Pro", Georgia, serif;
  --sans:          "Inter", "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:          "JetBrains Mono", "IBM Plex Mono", "SF Mono", Menlo, monospace;

  /* container widths */
  --page-max:      1280px;
  --reading-col:   680px;
  --form-col:      480px;

  /* page margins */
  --pad-x:         80px;
}

@media (max-width: 1023px) {
  :root { --pad-x: 48px; }
}
@media (max-width: 767px) {
  :root { --pad-x: 24px; }
}

/* ---- reset / base -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: currentColor;
  transition: color 150ms ease-out;
}
a:hover { color: var(--greenback); }

::selection { background: var(--greenback); color: var(--cream); }

/* ---- typography utilities ------------------------------------ */
.display-xl,
.display-l,
.display-m,
.heading-l,
.heading-m,
.heading-s {
  font-family: var(--serif-display);
  font-weight: 400;
  margin: 0;
  text-wrap: pretty;
}

.display-xl  { font-size: 88px; line-height: 1.02; letter-spacing: -0.02em; }
.display-l   { font-size: 64px; line-height: 1.05; letter-spacing: -0.02em; }
.display-m   { font-size: 48px; line-height: 1.1;  letter-spacing: -0.02em; }
.heading-l   { font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; }
.heading-m   { font-size: 28px; line-height: 1.2;  letter-spacing: -0.01em; font-weight: 500; }
.heading-s   { font-size: 22px; line-height: 1.3;                              font-weight: 500; }

.body-l { font-size: 20px; line-height: 1.55; }
.body-m { font-size: 17px; line-height: 1.6;  }
.body-s { font-size: 15px; line-height: 1.5;  }
.caption {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--ink-70);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin: 0;
}

.ink-70 { color: var(--ink-70); }
.greenback { color: var(--greenback); }
.brass { color: var(--brass); }

em, .italic { font-style: italic; }

@media (max-width: 767px) {
  body { font-size: 16px; }
  .display-xl { font-size: 56px; }
  .display-l  { font-size: 44px; }
  .display-m  { font-size: 36px; }
  .heading-l  { font-size: 28px; }
  .heading-m  { font-size: 22px; }
  .body-l     { font-size: 18px; }
  .body-m     { font-size: 16px; }
}

/* ---- layout primitives --------------------------------------- */
.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.reading {
  max-width: var(--reading-col);
  margin-left: auto;
  margin-right: auto;
}

.form-col {
  max-width: var(--form-col);
}

.section {
  padding-top: 88px;
  padding-bottom: 88px;
}
@media (max-width: 767px) {
  .section { padding-top: 56px; padding-bottom: 56px; }
}

.section-tight {
  padding-top: 64px;
  padding-bottom: 64px;
}
@media (max-width: 767px) {
  .section-tight { padding-top: 48px; padding-bottom: 48px; }
}

.divider {
  border: 0;
  border-top: 1px solid var(--ink-10);
  margin: 0;
}
.divider-short {
  border: 0;
  border-top: 1px solid var(--ink-10);
  width: 240px;
  margin: 0 auto;
}
.divider-heavy {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 0;
}

/* ---- header / nav -------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--cream) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--ink-10);
}
.nav-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 18px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.wordmark {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--greenback); }
.nav-links .sep {
  width: 1px;
  height: 12px;
  background: var(--ink-10);
}

.nav-cta {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 10px 18px;
  background: var(--greenback);
  color: var(--cream);
  border: 0;
  border-radius: 2px;
  text-decoration: none;
  transition: background-color 150ms ease-out;
}
.nav-cta:hover { background: var(--greenback-deep); color: var(--cream); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px 0;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--ink-10);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px var(--pad-x);
    gap: 20px;
  }
  .nav-links.open .sep { display: none; }
}

/* ---- buttons ------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 14px 24px;
  border-radius: 2px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
  white-space: nowrap;
}
.btn-primary {
  background: var(--greenback);
  color: var(--cream);
}
.btn-primary:hover { background: var(--greenback-deep); color: var(--cream); }

.btn-secondary {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--cream); }

.btn-tertiary {
  display: inline;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--greenback);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  letter-spacing: 0.01em;
  padding: 0;
  background: none;
}
.btn-tertiary:hover { color: var(--greenback); border-bottom-color: var(--greenback); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---- forms --------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.field label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-70);
  letter-spacing: 0.01em;
}
.field input,
.field textarea,
.field select {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--ink-10);
  border-radius: 2px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0ms;
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--brass-light);
  border-width: 1.5px;
  padding: 13.5px 15.5px;
}
.field .help {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-70);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%231A1814' stroke-width='1.2'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ---- image placeholder --------------------------------------- */
/* Sophisticated stand-in: warm cream surface, thin oak/ink hairline,
   monospace caption naming the photograph that goes here.
   Used until commissioned + generated photography arrives. */
.placeholder {
  position: relative;
  background-color: #ECE4D1;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(26, 24, 20, 0.06) 0,
      rgba(26, 24, 20, 0.06) 1px,
      transparent 1px,
      transparent 14px
    );
  border: 1px solid var(--ink-10);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.placeholder::before,
.placeholder::after {
  content: "";
  position: absolute;
  background: var(--ink);
  opacity: 0.5;
}
.placeholder::before { left: 16px; top: 16px; width: 18px; height: 1px; }
.placeholder::after  { left: 16px; top: 16px; width: 1px; height: 18px; }
.placeholder .label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-70);
  letter-spacing: 0.04em;
  text-align: center;
  padding: 16px 24px;
  line-height: 1.6;
  max-width: 60ch;
}
.placeholder .label .small { display: block; font-size: 10px; opacity: 0.7; margin-top: 6px; }

.placeholder-16-9 { aspect-ratio: 16 / 9; }
.placeholder-4-5  { aspect-ratio: 4 / 5;  }
.placeholder-3-2  { aspect-ratio: 3 / 2;  }
.placeholder-3-4  { aspect-ratio: 3 / 4;  }
.placeholder-1-1  { aspect-ratio: 1 / 1;  }

/* ---- footer -------------------------------------------------- */
.footer {
  border-top: 1px solid var(--ink-10);
  background: var(--cream);
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 56px var(--pad-x) 36px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}
.footer .wordmark {
  font-size: 15px;
  margin-bottom: 16px;
  display: block;
}
.footer h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer li a {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}
.footer li a:hover { color: var(--greenback); }
.footer .promise {
  font-family: var(--serif-body);
  font-size: 17px;
  color: var(--ink-70);
  margin: 12px 0 0;
  max-width: 34ch;
}
.footer-rallying {
  text-align: center;
  font-family: var(--serif-display);
  font-size: 22px;
  font-style: italic;
  color: var(--ink-70);
  padding: 32px 0;
  border-top: 1px solid var(--ink-10);
  border-bottom: 1px solid var(--ink-10);
  letter-spacing: 0.01em;
}
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-70);
  flex-wrap: wrap;
}
.footer-bottom a { color: var(--ink-70); text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); }
.footer-bottom .utility { display: flex; gap: 20px; }

/* ---- hero common --------------------------------------------- */
.hero {
  padding-top: 72px;
  padding-bottom: 72px;
}
@media (max-width: 767px) {
  .hero { padding-top: 48px; padding-bottom: 48px; }
}

.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 960px) {
  .hero-split { grid-template-columns: 1fr; gap: 48px; }
}

/* ---- bits ---------------------------------------------------- */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--serif-display);
  font-size: 14px;
  line-height: 1;
  padding-bottom: 1px;
}

.mark-brass {
  color: var(--brass);
  font-family: var(--serif-display);
}

/* ---- prose (long-form letter) -------------------------------- */
.prose p {
  font-family: var(--serif-body);
  font-size: 20px;
  line-height: 1.6;
  margin: 0 0 28px;
  color: var(--ink);
  text-wrap: pretty;
}
.prose p.lead { font-size: 22px; }
.prose em { font-style: italic; }
.prose strong { font-weight: 600; }
.prose .break {
  height: 1px;
  background: var(--ink-10);
  width: 120px;
  margin: 48px auto;
  border: 0;
}
@media (max-width: 767px) {
  .prose p { font-size: 18px; margin-bottom: 24px; }
}

/* ---- bordered band (Greenback or Ink full-bleed) ------------- */
.band-greenback {
  background: var(--greenback);
  color: var(--cream);
}
.band-greenback .eyebrow,
.band-greenback .ink-70 { color: rgba(245, 239, 227, 0.7); }
.band-greenback a { color: var(--cream); }

.band-ink {
  background: var(--ink);
  color: var(--cream);
}
.band-ink .eyebrow,
.band-ink .ink-70 { color: rgba(245, 239, 227, 0.7); }
.band-ink a { color: var(--cream); }

/* ---- utility ------------------------------------------------- */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mb-64 { margin-bottom: 64px; }
.text-center { text-align: center; }

/* arrow glyph for tertiary CTAs */
.arrow::after { content: " →"; font-family: var(--sans); }
