/* ============================================================
   base.css — loaded on every page. Reset, base type, the shared
   layout primitives (.column, .wide-container), the theme-variant
   section backgrounds, the button system, and the footer.
   site.css and case-study.css load after this and add whatever is
   specific to their own pages.
   ============================================================ */

/* 0. THEME
   Every color on the site is set once here and referenced everywhere
   else via var(). To re-theme the whole site, change values in this
   block only — nothing below it should ever hardcode a color.

   Brand — the two colors that define the site:
     --color-brand-black / --color-brand-yellow
   Everything else is a neutral or a tint derived from those two, used
   for text, backgrounds and borders across base.css, site.css and
   case-study.css. */

:root {
  /* Brand */
  --color-brand-black: #322f2f;
  --color-brand-yellow: #e7a200;
  --color-brand-yellow-light: #ffd558; /* caption chip */

  /* Text — warm near-black/gray instead of true black/gray, easier on
     the eyes at length (same idea as Notion's #37352f, Apple's #1d1d1f) */
  --color-text: #2e2b26;       /* body copy, li */
  --color-text-muted: #665f55; /* tag text */

  /* Backgrounds — warm paper-white page with a brighter white surface
     layered on top, rather than one flat gray (Notion/Apple-style) */
  --color-bg: whitesmoke;         /* page / html background */
  --color-surface: #ffffff;    /* off-white panels, e.g. button-row */
  --color-tag-bg: #edecea;     /* tag chip background */
  --color-footer-bg: #edecea; /* tan leather footer */

  /* Borders */
  --color-border: #edecea;
}

/* 1. RESET */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 2. BASE */

html {
  scroll-behavior: smooth;
  background-color: var(--color-bg);
}

body {
  font-family: "Karla", system-ui, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1 {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 4rem;
  font-weight: bold;
  letter-spacing: -0.06em;
  margin-bottom: 0.5rem;
  color: var(--color-brand-black);
}

h2,
h3,
h4 {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--color-brand-black);
  letter-spacing: -0.04em;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

p {
  line-height: 1.3;
  font-size: 1.1rem;
}

li {
  margin-left: 1rem;
  line-height: 1.3;
  font-size: 1.1rem;
}

section img {
  width: 100%;
  display: block;
}

.rounded img {
    border-radius: 0.1rem;
}

/* case1.html uses bare <hr> tags as spacing breaks between sections;
   strip the browser's default line so no divider renders. */
hr {
    border: solid 1px;
    color: var(--color-border);
}

figcaption a {
    margin: 1rem 0;
}

/* utility: colors inline text with the site's accent yellow
   (e.g. the period in the homepage hero heading) */
.text-accent {
    color: var(--color-brand-yellow);
}

/* 3. LAYOUT (shared) */

.column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: fit-content;
}

.wide-container {
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  gap: 4rem;
}

/* Theme variants (page-type sections add their own: .blue-section
   lives in case-study.css, since only case studies use it — it's now
   a bordered divider, not a color tint, despite the name) */

.white-section {
  padding: 6rem 0;
  max-width: 100%;
}

.dark-section {
  background: var(--color-brand-black);
  padding: 6rem 0;
  color: white;
}

.dark-section h2 {
  color: white;
}

/* 4. BUTTONS
   three roles sharing one black/yellow palette:
   primary = solid fill, for light backgrounds
   secondary = black outline, for light backgrounds
   inverse = yellow outline, for dark backgrounds where black
   text/border would disappear */

.btn-primary {
  display: inline-block;
  padding: 1rem 1.5rem;
  text-decoration: none;
  background-color: var(--color-brand-black);
  color: white;
  border-radius: 3px;
  /* transparent 2px border matches .btn-secondary's real 2px border
     so both buttons compute to the same height (a border-style: none
     border, even with a color set, takes up 0px) */
  border: 2px solid transparent;
  transition: background-color 120ms ease-in, color 120ms ease-in;
}

.btn-primary:hover {
  background-color: var(--color-brand-yellow);
  color: var(--color-brand-black);
}

.btn-secondary {
  display: inline-block;
  box-sizing: border-box;
  padding: 1rem 1.5rem;
  text-decoration: none;
  background-color: transparent;
  color: var(--color-brand-black);
  border-radius: 3px;
  border: 2px solid var(--color-brand-black);
  transition: background-color 120ms ease-in, color 120ms ease-in;
}

.btn-secondary:hover {
  background-color: var(--color-brand-black);
  color: var(--color-brand-yellow);
}

.btn-inverse {
  display: inline-block;
  padding: 1rem 1.5rem;
  text-decoration: none;
  background-color: transparent;
  color: var(--color-brand-yellow);
  border-radius: 3px;
  border: 2px solid var(--color-brand-yellow);
  transition: background-color 120ms ease-in, color 120ms ease-in;
}

.btn-inverse:hover {
  background-color: var(--color-brand-yellow);
  color: var(--color-brand-black);
}

/* 5. FOOTER */

footer {
  padding: 4rem;
  text-align: center;
  background-color:var(--color-footer-bg);
}

footer .wide-container {
  align-items: center;
}

/* .column defaults to align-items: stretch, which would stretch
   items to the full column width instead of hugging their content */
footer .column {
  align-items: center;
}

/* h1's own margin-bottom would stack on top of .column's
   gap — rely on the gap alone for even footer spacing */
footer h1 {
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

/* prominent and clickable, but deliberately not styled as a
   button — just large, bold, accent-colored text */
.footer-email {
  display: inline-block;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.2rem;
  color: var(--color-brand-black);
  text-decoration: none;
}

.footer-email:hover {
  text-decoration: underline;
}

/* 6. RESPONSIVE (widest breakpoint first) */

@media (max-width: 560px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }
}
