/* My Tax Collective
   Colors and type come from the brand system: Cream, Hearth, Heirloom Brass;
   EB Garamond, Libre Franklin, DM Sans. Fonts are stored with the site. */

@font-face { font-family: "EB Garamond"; src: url("/fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/fonts/libre-franklin-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/fonts/libre-franklin-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --cream: #F6F4EF;
  --cream-2: #EFEAE0;
  --cream-3: #E9E3D7;
  --hearth: #2C2420;
  --hearth-hover: #43372F;
  --brass: #9E874E;
  --hairline: rgba(44, 36, 32, 0.14);
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --max: 1160px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream) url("/images/grain.png") repeat;
  color: var(--hearth);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(17px, 0.95rem + 0.25vw, 18px);
  line-height: 1.7;
  font-variant-numeric: oldstyle-nums proportional-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(158, 135, 78, 0.28); color: var(--hearth); }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Skip link: hidden until a keyboard user tabs to it */
.skip-link {
  position: absolute; left: 16px; top: -120px; z-index: 10;
  padding: 12px 16px; background: var(--hearth); color: var(--cream);
  font-family: var(--ui); font-size: 15px; font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* Links: a resting hairline, and a brass line that draws across on hover */
.u-link { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.u-link span {
  background-image: linear-gradient(var(--brass), var(--brass)), linear-gradient(rgba(44, 36, 32, 0.3), rgba(44, 36, 32, 0.3));
  background-size: 0% 1px, 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%, 0 100%;
  padding-bottom: 2px;
  transition: background-size .45s var(--ease);
}
.u-link:hover span, .u-link:focus-visible span { background-size: 100% 1px, 100% 1px; }

/* Header */
.site-header { position: relative; z-index: 2; padding: 24px 0; }
.site-header--over { position: absolute; top: 0; left: 0; right: 0; }
.nowrap { white-space: nowrap; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--serif); font-size: 25px; font-weight: 400; line-height: 1.2; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 32px; font-family: var(--ui); font-size: 15px; font-weight: 400; }
.nav a:not(.u-link) { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }

/* Opening */
.hero { position: relative; overflow: hidden; padding: calc(144px + clamp(32px, 8vw, 144px)) 0 clamp(96px, 11vw, 160px); }
@media (min-width: 560px) { .hero { padding-top: calc(92px + clamp(48px, 8vw, 144px)); } }
.window-light {
  position: absolute; top: -40%; left: -25%; width: 150%; height: 180%;
  pointer-events: none; filter: blur(24px);
  background:
    radial-gradient(ellipse 42% 50% at 66% 40%, rgba(255, 251, 242, 0.95), rgba(255, 251, 242, 0) 70%),
    linear-gradient(0deg, rgba(44, 36, 32, 0) 47%, rgba(44, 36, 32, 0.055) 47%, rgba(44, 36, 32, 0.055) 49.5%, rgba(44, 36, 32, 0) 49.5%),
    repeating-linear-gradient(90deg, rgba(44, 36, 32, 0) 0, rgba(44, 36, 32, 0) 230px, rgba(44, 36, 32, 0.07) 230px, rgba(44, 36, 32, 0.07) 250px);
  transform: translate3d(0, 0, 0) rotate(-12deg);
  animation: window-light 30s ease-in-out infinite alternate;
}
.window-light.is-paused { animation-play-state: paused; }
@keyframes window-light {
  0%   { transform: translate3d(-5%, -2%, 0) rotate(-14deg); opacity: .55; }
  50%  { opacity: .85; }
  100% { transform: translate3d(7%, 3%, 0) rotate(-11deg); opacity: .6; }
}
.hero .wrap { position: relative; z-index: 1; }
.label { margin: 0 0 28px; font-family: var(--ui); font-size: clamp(12px, 0.75rem + 0.1vw, 13px); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.display {
  margin: 0; max-width: 980px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(42px, 5.6vw, 76px); line-height: 1.05; letter-spacing: -0.012em;
  text-wrap: balance;
}
.hero-body { margin: clamp(40px, 5vw, 64px) 0 0; max-width: 540px; }
.hero-body p { margin: 0; font-size: clamp(18px, 1.5vw, 20px); text-wrap: pretty; }
.hero-body .cta { margin-top: 32px; font-family: var(--ui); font-size: 16px; font-weight: 500; }
@media (min-width: 960px) { .hero-body { margin-left: auto; } }

/* Sections, separated by a hairline the width of the content */
.section { position: relative; padding: clamp(72px, 9vw, 144px) 0; }
.section::before {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto;
  height: 1px; background: var(--hairline); transform-origin: left center;
}

.split { display: grid; gap: 24px 80px; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); } }

.h2 { margin: 0; max-width: 18ch; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3vw, 42px); line-height: 1.15; text-wrap: balance; }
.prose { max-width: 660px; }
.prose p { margin: 0; max-width: 68ch; text-wrap: pretty; }
.prose p + p { margin-top: 24px; }

/* The exit passage: one large serif paragraph */
.passage { margin: 0; max-width: 960px; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.9vw, 32px); line-height: 1.4; text-wrap: pretty; }
.passage em { font-style: italic; }

/* What we do */
.decisions { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--hairline); }
.decisions li { padding: 16px 0; border-bottom: 1px solid var(--hairline); font-family: var(--serif); font-size: clamp(22px, 2vw, 24px); line-height: 1.4; }
.prose .built-for { margin: 48px 0 0; max-width: 62ch; font-size: 16px; font-weight: 400; line-height: 1.65; }

/* A note from Sarah */
.note { display: grid; gap: 40px 80px; align-items: start; }
@media (min-width: 960px) { .note { grid-template-columns: 300px minmax(0, 640px); } }
.portrait { margin: 0; max-width: 300px; background: var(--cream-3); }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.note-lead { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.2vw, 28px); line-height: 1.4; text-wrap: pretty; }
.note-body { margin: 28px 0 0; max-width: 60ch; text-wrap: pretty; }
.sig-rule { width: 40px; height: 1px; margin: 32px 0 16px; background: var(--brass); }
.signature { width: 176px; margin: 0 0 6px -8px; }
.sig-name { margin: 0; font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.4; }

/* Closing */
.closing { margin: 0; max-width: 760px; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.8vw, 52px); line-height: 1.1; text-wrap: balance; }
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; }
.button {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 32px;
  background-color: var(--hearth); color: var(--cream); border-radius: 2px;
  font-family: var(--ui); font-size: 16px; font-weight: 500; text-decoration: none;
  transition: background-color .3s ease;
}
.button:hover { background-color: var(--hearth-hover); }
.partner { margin: 0; font-family: var(--ui); font-size: 15px; font-weight: 400; }

/* Footer: the only dark area */
.site-footer { background: var(--hearth); color: var(--cream); padding: 64px 0 48px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 48px; }
.footer-mark { margin: 0; font-family: var(--serif); font-size: 24px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 28px; font-family: var(--ui); font-size: 15px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cream); text-underline-offset: 4px; text-decoration-color: rgba(246, 244, 239, 0.4); }
.footer-nav a:hover { text-decoration-color: var(--brass); }
.disclaimer { margin: 32px 0 0; max-width: 860px; font-size: 14px; font-weight: 400; line-height: 1.65; color: rgba(246, 244, 239, 0.86); }
.copyright { margin: 20px 0 0; font-family: var(--ui); font-size: 13px; color: rgba(246, 244, 239, 0.86); font-variant-numeric: lining-nums; }

/* 404 */
.notfound { padding: clamp(96px, 14vw, 176px) 0; }
.notfound p { margin: 24px 0 0; max-width: 52ch; }

/* Motion. Text never waits: it is visible the moment the page loads.
   Only the hairlines and the portrait move, briefly, and only when the
   script has confirmed the visitor hasn't asked for reduced motion. */
.reveal-ready .section::before { transform: scaleX(0); transition: transform .5s var(--ease); }
.reveal-ready .section.is-in::before { transform: scaleX(1); }
.reveal-ready .portrait img { opacity: 0; transition: opacity .45s ease; }
.reveal-ready .portrait.is-in img { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .window-light { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
