/* Staley Law site styles. Rebuilt 2026-12-01 to match the old Squarespace site exactly, with no Squarespace code.
   Type sizes use the same formulas her Squarespace theme used, so headings scale with the screen the same way.
   Section layouts (grid rows and where each block sits) live in each section file under site/sections/. */

/* ---- Fonts (self-hosted) ------------------------------------------------------------------------------------- */
@font-face { font-family: "Cabin"; src: url("/fonts/cabin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cabin"; src: url("/fonts/cabin-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
/* h1: closest free match for The Pretender Serif Expanded Bold (README "Closest free match") */
@font-face { font-family: "Roboto Serif"; src: url("/fonts/roboto-serif-900-wide.woff2") format("woff2"); font-weight: 900; font-stretch: 150%; font-display: swap; }
/* h2, h3, buttons: closest free match for The Pretender Sans Expanded Bold */
@font-face { font-family: "Krona One"; src: url("/fonts/krona-one.woff2") format("woff2"); font-weight: 400; font-display: swap; }
/* h4: the real Pretender Medium Serif, from her own site */
@font-face { font-family: "Pretender Medium Serif"; src: url("/fonts/pretender-medium-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ---- Tokens -------------------------------------------------------------------------------------------------- */
:root {
  --black: #261B12;      /* hsl(26 37% 11%) */
  --brown: #5C3D1E;      /* hsl(30 51% 24%) */
  --cream: #FFF5DB;      /* hsl(43 100% 93%) */
  --orange: #FFA929;     /* hsl(36 100% 58%) */
  --rust: #91493B;       /* hsl(10 42% 40%) */

  --font-body: "Cabin", sans-serif;
  --font-display: "Roboto Serif", serif;
  --font-label: "Krona One", sans-serif;
  --font-accent: "Pretender Medium Serif", serif;

  --sqs-site-gutter: 3vw;
  --sqs-mobile-site-gutter: 6vw;
  --sqs-site-max-width: 3000px;
  --body-scale: 1.2;     /* Noah 2026-12-01: body copy 20% larger than her theme */

  --bg: var(--cream); --text: var(--black); --heading: var(--black);
  --btn-bg: var(--brown); --btn-text: var(--cream);
}
.theme-black { --bg: var(--black); --text: var(--cream); --heading: var(--cream); --btn-bg: var(--orange); --btn-text: var(--black); }
.theme-dark, .theme-dark-bold { --bg: var(--brown); --text: var(--cream); --heading: var(--cream); --btn-bg: var(--cream); --btn-text: var(--black); }
.theme-white { --bg: var(--cream); --text: var(--black); --heading: var(--black); --btn-bg: var(--brown); --btn-text: var(--cream); }

/* ---- Base ---------------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--black); font-family: var(--font-body); font-size: 1rem;
       line-height: 1.5em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img { max-width: 100%; }
a { color: inherit; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--cream); color: var(--black);
             font: 700 16px var(--font-body); text-decoration: none; }
.skip-link:focus { top: 12px; }

/* Headings: her theme's sizes and line heights, with the stand-in fonts and their tracking. */
h1, h2, h3, h4 { margin: 2rem 0; font-weight: 400; text-transform: uppercase; color: var(--heading); }
h1 { font-family: var(--font-display); font-weight: 900; font-stretch: 150%; font-variation-settings: "opsz" 8;
     letter-spacing: .02em; --size: 4; line-height: 1.408em; }
h2, h3 { font-family: var(--font-label); -webkit-text-stroke: .045em currentColor; letter-spacing: .02em; }
h2 { --size: 2.2; line-height: 1.5232em; }
h3 { --size: 1.5; line-height: 1.568em; }
h4 { font-family: var(--font-accent); letter-spacing: .06em; --size: 2.2; line-height: 1.5232em; }
/* Phones held upright scale with screen height; wider or landscape screens scale with width (her theme's rule). */
h1, h2, h3, h4 { font-size: calc((var(--size) - 1) * calc(.012 * min(100vh, 900px)) + 1rem); }
@media (min-width: 768px), (orientation: landscape) {
  h1, h2, h3, h4 { font-size: min(calc((var(--size) - 1) * 1.2vw + 1rem),
                                  max(calc((var(--size) - 1) * .012 * 3000px + 1rem), calc(var(--size) * 1rem))); }
}
/* Never split a word across lines in a heading or button; site.js shrinks a heading whose longest word won't fit. */
h1, h2, h3, h4, .btn, button {
  overflow-wrap: normal; word-break: normal; -webkit-hyphens: manual; hyphens: manual;
}
a[href^="tel:"], a[href^="sms:"] { white-space: nowrap; }

/* ---- Sections -------------------------------------------------------------------------------------------------- */
.sec { position: relative; display: flex; align-items: center; background: var(--bg); color: var(--text); }
.sec.v-top { align-items: flex-start; }
.sec.v-bottom { align-items: flex-end; }
.sec-bg { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }
.sec-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.sec-ov { position: absolute; inset: 0; background: var(--bg); }
.sec-wrap { position: relative; width: 100%; }
.h-small { min-height: 33vh; }  .h-small > .sec-wrap { padding-block: 3.3vmax; }
.h-medium { min-height: 66vh; } .h-medium > .sec-wrap { padding-block: 6.6vmax; }
.h-large { min-height: 100vh; } .h-large > .sec-wrap { padding-block: 10vmax; }

/* The layout grid: 8 columns on phones, 24 from 768px, same gutters and row heights as her old pages. */
.fe {
  --grid-gutter: calc(var(--sqs-mobile-site-gutter) - 11px);
  --cell-max-width: calc((var(--sqs-site-max-width) - 11px * 7) / 8);
  display: grid; position: relative;
  grid-template-rows: repeat(var(--rows), minmax(24px, auto));
  grid-template-columns: minmax(var(--grid-gutter), 1fr) repeat(8, minmax(0, var(--cell-max-width))) minmax(var(--grid-gutter), 1fr);
  row-gap: 11px; column-gap: 11px; overflow-x: clip;
}
@media (min-width: 768px) {
  .fe {
    --grid-gutter: calc(var(--sqs-site-gutter) - 11px);
    --cell-max-width: calc((var(--sqs-site-max-width) - 11px * 23) / 24);
    --container-width: min(var(--sqs-site-max-width), calc(100vw - var(--sqs-site-gutter) * 2));
    grid-template-rows: repeat(var(--rows-d), minmax(calc(var(--container-width) * var(--row-scale, .0215)), auto));
    grid-template-columns: minmax(var(--grid-gutter), 1fr) repeat(24, minmax(0, var(--cell-max-width))) minmax(var(--grid-gutter), 1fr);
  }
}
.fe-block { position: relative; min-width: 0; }
.blk { display: flex; flex-direction: column; justify-content: var(--just, flex-start); width: 100%; height: 100%; }

/* Text blocks */
.blk-text .txt > :first-child { margin-top: 0; }
.blk-text .txt > :last-child { margin-bottom: 0; }
.blk-text h1, .blk-text h2, .blk-text h3, .blk-text h4, .blk-text p { white-space: pre-wrap; }
.blk-text p { margin: 1rem 0; line-height: 1.5em; font-size: calc(1rem * var(--body-scale)); }
.blk-text p:empty::before { content: ""; display: inline-block; }  /* an empty line keeps its height */
.blk-text .t-small { font-size: calc((calc((.9 - 1) * calc(.012 * min(100vh, 900px)) + 1rem)) * var(--body-scale)); }
@media (min-width: 768px), (orientation: landscape) {
  .blk-text .t-small { font-size: calc(min(calc((.9 - 1) * 1.2vw + 1rem), max(calc((.9 - 1) * .012 * 3000px + 1rem), .9rem))
                                        * var(--body-scale)); }
}
.blk-text ul, .blk-text ol { margin: 1rem 0; padding-left: 40px; }
.blk-text li { margin: 0; }
.blk-text li > * { margin: .5em 0; }
.blk-text li:not(:has(p)) { font-size: calc(1rem * var(--body-scale)); }  /* a list item holding a heading */
.blk-text a { color: inherit; }
.ta-center { text-align: center; }
.ta-right { text-align: right; }
.c-white { color: var(--cream); }
.c-black { color: var(--black); }
.c-lightAccent { color: var(--orange); }
.c-accent { color: var(--rust); }
.c-darkAccent { color: var(--brown); }

/* Image blocks */
.blk-img { position: relative; overflow: hidden; }
.blk-img img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Divider lines */
.blk-rule { justify-content: center; }
.blk-rule hr { width: 100%; height: 1px; margin: 8px 0; border: 0; background: currentColor; }

/* Social links */
.blk-social { flex-direction: row; align-items: flex-start; gap: 8px; }
.social__link { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--text);
                box-shadow: 0 0 0 1px currentColor inset; transition: background-color .2s ease, color .2s ease; }
.social__link svg { width: 15px; height: 15px; }
.social__link:hover { background: var(--text); color: var(--bg); }

/* ---- Buttons --------------------------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 1.2em 2.004em; border: 0; border-radius: 0;
       background: var(--btn-bg); color: var(--btn-text); font: 400 1rem/normal var(--font-label); letter-spacing: -.04em;
       -webkit-text-stroke: .045em currentColor; text-decoration: none; text-align: center; cursor: pointer;
       transition: opacity .2s ease; }
.btn:hover { opacity: .8; }
.btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.btn--stretch { width: 100%; height: 100%; padding-block: 0; }
.blk-button { justify-content: center; }
/* Buttons built from <button> had the label font on the old site too. */
button.sl-btn, .sl-card__more { font-family: var(--font-label) !important; -webkit-text-stroke: .045em currentColor; letter-spacing: -.04em !important; }

/* ---- Header ---------------------------------------------------------------------------------------------------- */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; padding: calc(.1vw + 16px) var(--sqs-site-gutter) .1vw; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
/* The header sits over the first homepage section, which starts below it (her theme did the same). */
main > .sec:first-child { padding-top: calc(.2vw + 88px); }
@media (max-width: 799px) { main > .sec:first-child { padding-top: calc(7.6vw + 67px); } }
@media (max-width: 767px) { main > .sec:first-child { padding-top: calc(7.6vw + 51px); } }
.site-header__logo { display: block; line-height: 0; }
.site-header__logo img { display: block; height: 72px; width: auto; }
.site-header .btn { padding: 1.2em 2.004em; background: var(--orange); color: var(--black); }
.site-header__burger { display: none; }
.site-menu { display: none; }
@media (max-width: 799px) {
  .site-header { padding: calc(3.8vw + 16px) var(--sqs-mobile-site-gutter) 3.8vw; }
  .site-header__inner { min-height: 51px; }
  .site-header__logo img { height: 48px; }
  .site-header__cta { display: none; }
  .site-header__burger { position: relative; z-index: 12; display: block; width: 47px; height: 37px; padding: 0; margin: 0 -6px 0 0;
                         border: 0; background: none; cursor: pointer; }
  .site-header__burger span { position: absolute; left: 6px; width: 35px; height: 1px; background: var(--orange);
                              transition: transform .25s ease, background-color .25s ease; }
  .site-header__burger span:first-child { top: 13px; }
  .site-header__burger span:last-child { top: 24px; }
  .menu-open .site-header__burger span { background: var(--black); }
  .menu-open .site-header__burger span:first-child { transform: translateY(5.5px) rotate(45deg); }
  .menu-open .site-header__burger span:last-child { transform: translateY(-5.5px) rotate(-45deg); }
  .menu-open .site-header__logo { visibility: hidden; }
  .menu-open .site-header { z-index: 12; }  /* the close button sits above the open menu */
  .site-menu { position: fixed; inset: 0; z-index: 11; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
               padding: 0 6vw 24px; background: var(--cream); visibility: hidden; opacity: 0;
               transition: visibility .6s cubic-bezier(.4, 0, .2, 1), opacity .4s cubic-bezier(.4, 0, .2, 1); }
  .menu-open .site-menu { visibility: visible; opacity: 1; }
  .site-menu .btn { width: 210px; padding: 1.2em 2.004em; font-size: 1.2rem; background: var(--rust); color: var(--cream); }
  .menu-open { overflow: hidden; }
}
@media (max-width: 767px) { .site-header { padding-top: 3.8vw; } }

/* ---- Fade-up on scroll (the old site's "flex / fade" animation) ------------------------------------------------- */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); }
.js-reveal .reveal.is-in { opacity: 1; transform: none;
  transition: opacity .65s cubic-bezier(.19, 1, .22, 1), transform .65s cubic-bezier(.19, 1, .22, 1); }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; }
  .btn, .site-menu, .site-header__burger span { transition: none; }
}
