/* Westside Development Group | site styles */

@font-face { font-family: "Ovo"; src: url("/assets/fonts/ovo-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Almarai"; src: url("/assets/fonts/almarai-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Almarai"; src: url("/assets/fonts/almarai-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #0c0c0c;
  --paper: #ffffff;
  --stone: #f5f5f4;
  --tan: #bf8e6a;          /* brand accent, used on dark */
  --tan-deep: #8a5d3b;     /* accent text on light backgrounds */
  --tan-hover: #d0a584;
  --text-light: #1c1917;
  --muted-light: #57534e;
  --muted-dark: rgba(255, 255, 255, 0.7);
  --rule-light: #e7e5e4;
  --rule-dark: rgba(255, 255, 255, 0.16);

  --serif: "Ovo", Georgia, "Times New Roman", serif;
  --sans: "Almarai", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 128px);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--ink);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.theme-light { background: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }

/* ---------- type ---------- */
h1, h2, h3, .h3 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 2rem + 3.2vw, 4.25rem); line-height: 1.06; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 1.6rem + 2vw, 3rem); line-height: 1.1; letter-spacing: -0.015em; }
h3, .h3 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); line-height: 1.2; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem); line-height: 1.6; }
strong { font-weight: 700; }
.accent { color: var(--tan); }
.light .accent { color: var(--tan-deep); }
.center { text-align: center; }

.inline-accent {
  color: var(--tan);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.light .inline-accent { color: var(--tan-deep); }
.inline-accent:hover { color: var(--tan-hover); }

.text-link {
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--tan);
  white-space: nowrap;
}
.light .text-link, .stone .text-link { color: var(--tan-deep); }
.text-link:hover { text-decoration: underline; text-underline-offset: 0.25em; }

/* ---------- layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.dark { background: var(--ink); color: #fff; }
.light { background: var(--paper); color: var(--text-light); }
.stone { background: var(--stone); color: var(--text-light); }
.light + .light { padding-top: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 6vw, 96px);
  align-items: start;
}
.split > :last-child { max-width: 62ch; }
.split > :last-child > :last-child, .split > p:last-child { margin-bottom: 0; }
.split h1, .split h2, .split .h3 { margin-bottom: 0; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- skip link ---------- */
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  background: var(--tan); color: var(--ink); padding: 8px 14px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-header { padding: 22px 0; }
.site-header.dark { background: var(--ink); border-bottom: 1px solid var(--rule-dark); }
.site-header.light { background: var(--paper); border-bottom: 1px solid var(--rule-light); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.brand img { width: 132px; }
.site-nav { display: flex; gap: clamp(18px, 3vw, 34px); flex-wrap: wrap; }
.site-nav a {
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.site-header.dark .site-nav a { color: rgba(255, 255, 255, 0.82); }
.site-header.light .site-nav a { color: var(--muted-light); }
.site-nav a:hover { color: var(--tan); }
.site-header.light .site-nav a:hover { color: var(--tan-deep); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--tan); }
.site-header.dark .site-nav a[aria-current="page"] { color: #fff; }
.site-header.light .site-nav a[aria-current="page"] { color: var(--text-light); }
@media (max-width: 520px) {
  .site-header { padding: 18px 0 12px; }
  .brand img { width: 96px; }
  .site-header__inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 16px 26px;
  border: 0;
  border-radius: 2px;
  background: var(--tan);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--tan-hover); }
.btn--on-light { background: var(--ink); color: #fff; }
.btn--on-light:hover { background: #2a2a2a; }
:focus-visible { outline: 2px solid var(--tan); outline-offset: 3px; }

/* ---------- home ---------- */
.hero { padding-top: clamp(56px, 8vw, 112px); }
.hero h1 { font-size: clamp(2.5rem, 1.9rem + 2.6vw, 3.875rem); }
.hero__body .lead { color: rgba(255, 255, 255, 0.88); }
.hero__body .lead:last-of-type { margin-bottom: 0; }
.hero__body .btn { margin-top: 32px; }
.hero__body p:last-child { margin-bottom: 0; }

.build__art { margin: 0 0 clamp(40px, 6vw, 72px); padding-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--rule-light); }
.build__art img { width: 100%; max-width: 1100px; margin: 0 auto; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: clamp(28px, 4vw, 48px); flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* ---------- note cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card__link { display: block; text-decoration: none; color: inherit; }
.card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--rule-light); margin-bottom: 18px; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card__link:hover .card__media img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .card__media img { transition: none; } }
.card__date { display: block; font-size: 0.8125rem; letter-spacing: 0.04em; color: var(--muted-light); margin-bottom: 8px; }
.card__title { font-family: var(--serif); font-weight: 400; font-size: 1.375rem; line-height: 1.25; margin: 0 0 10px; }
.card__link:hover .card__title { color: var(--tan-deep); }
.card__excerpt { font-size: 0.9375rem; color: var(--muted-light); margin: 0; }
.cards--single { grid-template-columns: 1fr; }
.cards--single .card__link { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.cards--single .card__media { margin-bottom: 0; }
.cards--single .card__title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
@media (max-width: 700px) { .cards--single .card__link { display: block; } .cards--single .card__media { margin-bottom: 18px; } }
.prose .sources { font-size: 0.875rem; line-height: 1.55; }
.prose .sources li { margin-bottom: 6px; overflow-wrap: anywhere; }

/* ---------- about ---------- */

.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); margin: clamp(32px, 4vw, 56px) 0 clamp(48px, 6vw, 72px); }
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }
.pillar { border-top: 1px solid var(--tan); padding-top: 20px; }
.pillar h3 { font-size: 1.375rem; margin-bottom: 12px; }
.pillar p { font-size: 0.9875rem; color: var(--muted-light); margin: 0; }

.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px); margin-top: clamp(32px, 4vw, 56px); }
@media (max-width: 900px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .people { grid-template-columns: 1fr; } }
.person__photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; margin-bottom: 22px; background: #222; }
.person__name { font-size: 1.625rem; margin-bottom: 4px; }
.person__role { font-weight: 700; font-size: 0.875rem; color: var(--tan); margin-bottom: 14px; }
.person__bio { font-size: 0.9875rem; color: var(--muted-dark); }

/* ---------- contact + form ---------- */
.contact { border-top: 1px solid var(--rule-dark); }
.contact--page { border-top: 0; padding-top: clamp(48px, 7vw, 96px); }
.contact__intro .lead { color: rgba(255, 255, 255, 0.88); margin-top: 0.4em; }
.contact__direct { margin-top: 28px; line-height: 2; }
.contact__direct a { color: var(--tan); text-decoration: none; }
.contact__direct a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.contact .split > :last-child { max-width: none; }

.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field span { font-size: 0.875rem; color: rgba(255, 255, 255, 0.82); }
.field em { font-style: normal; color: rgba(255, 255, 255, 0.5); font-size: 0.8125rem; }
.field input, .field textarea {
  font: inherit;
  font-size: 1rem;
  color: #fff;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  padding: 10px 0;
  width: 100%;
  transition: border-color 0.15s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--tan); }
.form .btn { justify-self: start; margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- notes index ---------- */
.notes-index { padding-top: clamp(48px, 7vw, 96px); }
.page-intro { max-width: 62ch; margin-bottom: clamp(40px, 6vw, 72px); }
.page-intro .lead { color: var(--muted-light); }
.notes-index .card__title { font-size: 1.5rem; }

/* ---------- post ---------- */
.post { padding-top: clamp(40px, 6vw, 72px); }
.post__wrap { max-width: calc(720px + 2 * var(--gutter)); }
.post__back { display: inline-block; margin-bottom: clamp(28px, 4vw, 48px); }
.post__head { margin-bottom: clamp(28px, 4vw, 44px); }
.post__head time { display: block; font-size: 0.875rem; letter-spacing: 0.04em; color: var(--muted-light); margin-bottom: 14px; }
.post__head h1 { font-size: clamp(2.125rem, 1.7rem + 2.2vw, 3.25rem); line-height: 1.1; margin: 0; }

.prose { font-size: 1.0938rem; line-height: 1.75; color: var(--text-light); }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin-bottom: 0; }
.prose h2 { font-size: clamp(1.625rem, 1.4rem + 1vw, 2rem); line-height: 1.2; margin: 2em 0 0; }
.prose h3 { font-size: 1.375rem; margin: 1.6em 0 0; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose ul, .prose ol { padding-left: 1.25em; margin-bottom: 0; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--tan-deep); }
.prose a { color: var(--tan-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.prose a:hover { color: var(--text-light); }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; }
.prose figure > a { display: block; }
.prose figcaption { font-size: 0.875rem; color: var(--muted-light); margin-top: 10px; line-height: 1.5; }

.post-summary { background: var(--stone); border-left: 2px solid var(--tan); padding: 22px 26px; margin: 1.6em 0 0; }
.post-summary__label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tan-deep); margin: 0 0 10px !important; }
.post-summary ul { font-size: 1rem; line-height: 1.6; margin: 0; }

.post__foot { margin-top: clamp(48px, 6vw, 72px); padding-top: 28px; border-top: 1px solid var(--rule-light); color: var(--muted-light); }
.post__foot a { color: var(--tan-deep); }

/* ---------- simple pages ---------- */
.simple-page { min-height: 52vh; }
.simple-page .lead { color: rgba(255, 255, 255, 0.85); max-width: 52ch; }
.simple-page .btn { margin-top: 12px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule-dark); padding: clamp(48px, 6vw, 72px) 0 28px; }
.site-footer__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.site-footer__brand img { width: 104px; }
.site-footer__social { display: flex; gap: 20px; }
.site-footer__social a { color: rgba(255, 255, 255, 0.75); display: block; }
.site-footer__social a:hover { color: var(--tan); }
.site-footer__social svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.site-footer__contact { justify-self: end; text-align: right; display: grid; gap: 4px; font-size: 0.9375rem; }
.site-footer__contact a { color: var(--tan); text-decoration: none; }
.site-footer__contact a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.site-footer__legal { margin-top: 40px; }
.site-footer__legal p { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.45); margin: 0; padding-top: 20px; border-top: 1px solid var(--rule-dark); }
@media (max-width: 680px) {
  .site-footer__inner { grid-template-columns: 1fr; justify-items: start; }
  .site-footer__contact { justify-self: start; text-align: left; }
}
