/* Western Living: the Sacramento Elite world.
   A Sunset-style home feature: white coated stock, warm daylight photography carrying
   the page, a heavy condensed gothic for heads, a serif for captions, burnt orange for
   the call and the department head only, deep teal for links and the masthead. */

@font-face { font-family: "Reddit Sans Condensed"; src: url("../fonts/reddit-sans-condensed-var-latin.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Petrona"; src: url("../fonts/petrona-var-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Petrona"; src: url("../fonts/petrona-var-italic-latin.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --wl-ground: #FEFDFB;
  --wl-paper: #FFFFFF;
  --wl-ink: #0A111C;
  --wl-ink-2: #34404A;
  --wl-ink-3: #4F5C66;
  --wl-teal: #0F4C5C;
  --wl-teal-ink: #0B3A4E;
  --wl-orange: #C4471A;
  --wl-orange-deep: #A93A12;
  --wl-rule: #C9D1D6;
  --wl-rule-ink: #2B3A44;
  --wl-head: "Reddit Sans Condensed", "Arial Narrow", sans-serif;
  --wl-serif: "Petrona", Georgia, serif;
  --wl-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.living { background: var(--wl-ground); color: var(--wl-ink); }
.living ::selection { background: #F3D6C8; color: var(--wl-ink); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- masthead */
.mast { background: var(--wl-ground); position: relative; z-index: 20; }
.mast-in { display: flex; align-items: center; gap: 1rem; height: 72px; padding: 0 20px; }
.mast-logo { display: block; flex: none; line-height: 0; }
.mast-logo img { height: 44px; width: auto; mix-blend-mode: multiply; }
.mast-nav { display: none; }
.mast-rule { display: none; }
.mast-tel { margin-left: auto; font-family: var(--wl-serif); font-weight: 700; font-size: 1.15rem; color: var(--wl-teal-ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
@media (max-width: 459px) {
  /* phones: logo, the full number and a labelled Menu button all stay on one line */
  .mast-in { gap: 0.4rem; padding: 0 12px; }
  .mast-logo img { height: clamp(21px, 7vw, 34px); }
  .mast-tel { font-size: clamp(0.84rem, 3.95vw, 1.05rem); letter-spacing: -0.01em; }
  .mast-toggle { gap: 0.3rem; padding: 0 0.5rem; font-size: clamp(0.88rem, 3.9vw, 1rem); }
  .mast-toggle svg { width: 18px; height: 18px; }
}
.mast-toggle { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0 0.6rem; border: 1px solid var(--wl-rule-ink); border-radius: 3px; background: none; color: var(--wl-teal-ink); font: 600 1rem var(--wl-head); cursor: pointer; }
.mast-toggle svg { width: 20px; height: 20px; fill: currentColor; }
/* The old site.css styles #primary-nav by id (hidden, then shown from 1024px), so every
   masthead nav rule here carries the id to win: closed below 1100px, a dropdown when open. */
#primary-nav.mast-nav { display: none; }
#primary-nav.mast-nav a { font-family: var(--wl-serif); font-weight: 400; color: var(--wl-teal-ink); padding: 0; border: 0; background: none; }
@media (max-width: 1099px) {
  #primary-nav.mast-nav.open { display: flex; flex-direction: column; gap: 0; margin: 0; position: absolute; left: 0; right: 0; top: 100%; background: var(--wl-paper); border-top: 1px solid var(--wl-rule); padding: 0.25rem 20px 0.75rem; box-shadow: 0 12px 24px rgba(10, 17, 28, 0.12); }
  #primary-nav.mast-nav.open a { display: flex; align-items: center; min-height: 52px; font-size: 1.15rem; border-bottom: 1px solid var(--wl-rule); }
  #primary-nav.mast-nav.open a:last-child { border-bottom: 0; }
  .mast-toggle[aria-expanded="true"] { background: var(--wl-teal-ink); color: #fff; border-color: var(--wl-teal-ink); }
}
.mast-nav a { font-family: var(--wl-serif); font-weight: 400; color: var(--wl-teal-ink); text-decoration: none; }
.mast-nav a:hover, .mast-nav a[aria-current] { color: var(--wl-orange-deep); }

@media (min-width: 1100px) {
  .mast-in { height: 5.34vw; padding: 0 2.7vw 0 3.26vw; gap: 0; }
  .mast-logo img { height: 4.43vw; }
  #primary-nav.mast-nav { display: flex; position: static; margin: 0 0 0 auto; padding: 0; gap: 2.55vw; background: none; box-shadow: none; border: 0; }
  #primary-nav.mast-nav a { font-size: 1.24vw; display: inline-flex; align-items: center; min-height: 44px; }
  .mast-rule { display: block; width: 1px; height: 2.47vw; background: #3C5B6B; margin: 0 2.47vw 0 2.6vw; }
  .mast-tel { margin-left: 0; font-size: 1.56vw; font-weight: 700; letter-spacing: 0.01em; min-width: 10.42vw; }
  #primary-nav.mast-nav a { letter-spacing: -0.005em; }
  .mast-toggle { display: none; }
}

/* ---------------------------------------------------------------- cover */
.cover { position: relative; }
.living main > section.cover, .living main > section.dept { padding-top: 0; margin-top: 0; }
.cover-frame { position: relative; }
.cover-photo { display: block; overflow: hidden; }
.cover-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 52% 50%; }
.cover-h1 { font-family: var(--wl-head); font-weight: 700; color: var(--wl-ink); font-size: clamp(2.3rem, 1.6rem + 3.4vw, 3.4rem); line-height: 0.96; letter-spacing: -0.012em; margin: 0; padding: 1.4rem 20px 0; text-wrap: balance; }

.cover-tags { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 4 / 3; pointer-events: none; }
.cover-tags .tag { pointer-events: auto; }
.tag { position: absolute; z-index: 3; }
.tag button { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--wl-ink); text-align: left; }
.tag .dot { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--wl-orange); color: #fff; font: 700 1.15rem/1 var(--wl-head); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(10, 17, 28, 0.25); }
.tag .lab { background: var(--wl-paper); padding: 0.3rem 0.55rem; font: 500 0.95rem/1.2 var(--wl-head); color: var(--wl-ink); box-shadow: 0 2px 8px rgba(10, 17, 28, 0.16); }
.tag button[aria-expanded="true"] .dot { background: var(--wl-teal); }
.tag button:focus-visible { outline: 3px solid var(--wl-orange); outline-offset: 3px; }
.tag .leader { position: absolute; display: block; width: 1px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 0 2px rgba(10, 17, 28, 0.35); transform-origin: top left; }
.tag .leader::after { content: ""; position: absolute; left: -3px; bottom: -3px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 2px rgba(10, 17, 28, 0.35); }
.tag-note { position: absolute; left: 0; top: calc(100% + 8px); width: min(19rem, 80vw); margin: 0; padding: 0.75rem 0.9rem; background: var(--wl-paper); color: var(--wl-ink-2); font: 400 1rem/1.45 var(--wl-serif); box-shadow: 0 10px 28px rgba(10, 17, 28, 0.22); z-index: 5; }
.tag-note:not([hidden]) { animation: wl-note 220ms var(--wl-ease); }
@keyframes wl-note { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* phone and tablet: tags sit on the photo's 4:3 crop; leaders are desktop only */
.t1 { left: 12px; top: 70%; } .t2 { left: 40%; top: 38%; } .t3 { left: auto; right: 12px; top: 84%; }
.tag .lab { max-width: 8.6rem; }
.tag .leader { display: none; }
.tag .lab { max-width: 9.5rem; text-wrap: balance; }
@media (max-width: 699px) {
  /* phone: smaller tags so the three cover no more of the photo than the comp's do */
  .tag .dot { width: 28px; height: 28px; font-size: 0.95rem; }
  .tag button { gap: 0.35rem; }
  .tag .lab { max-width: 6.6rem; padding: 0.2rem 0.4rem; font-size: 0.8rem; line-height: 1.15; }
}

.cover-card { position: relative; z-index: 4; margin: 1.4rem 20px 0; }
.reply { background: var(--wl-paper); padding: 1.3rem 1.3rem 1.4rem; box-shadow: 0 14px 36px rgba(10, 17, 28, 0.16); display: flex; flex-direction: column; gap: 0.75rem; }
.reply-title { margin: 0 0 0.15rem; font: 700 2rem/1 var(--wl-head); color: var(--wl-teal-ink); letter-spacing: -0.01em; }
.reply-in { width: 100%; min-height: 48px; padding: 0 0.85rem; border: 1px solid #7A8790; border-radius: 3px; background: #fff; font: 400 1.05rem var(--wl-head); color: var(--wl-ink); }
.reply-in::placeholder { color: #55626C; opacity: 1; }
select.reply-in { appearance: none; color: #55626C; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230A111C' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 12px 8px; padding-right: 2.2rem; }
select.reply-in:valid { color: var(--wl-ink); }
.reply-in:focus { outline: 3px solid rgba(196, 71, 26, 0.35); outline-offset: 1px; border-color: var(--wl-orange); }
.reply-in:user-invalid { border-color: #A3351E; }
.reply-send { display: grid; gap: 0.6rem; margin-bottom: -0.75rem; max-height: 0; overflow: hidden; opacity: 0; transition: max-height 320ms var(--wl-ease), opacity 200ms var(--wl-ease); }
.reply:focus-within .reply-send,
.reply:has(input.reply-in:not(:placeholder-shown)) .reply-send,
.reply:has(select.reply-in:valid) .reply-send { max-height: 260px; opacity: 1; margin-bottom: 0; }
.reply-submit { min-height: 50px; border: 2px solid var(--wl-teal-ink); border-radius: 3px; background: transparent; color: var(--wl-teal-ink); font: 700 1.15rem var(--wl-head); cursor: pointer; }
.reply-submit:hover { background: var(--wl-teal-ink); color: #fff; }
.reply-submit:focus-visible, .reply-call:focus-visible { outline: 3px solid var(--wl-ink); outline-offset: 2px; }
.reply-note { margin: 0; font: 400 0.92rem/1.4 var(--wl-serif); color: var(--wl-ink-3); }
.reply-call { display: flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 52px; border-radius: 3px; background: var(--wl-orange); color: #fff; font: 700 1.25rem var(--wl-head); text-decoration: none; letter-spacing: 0.005em; }
.reply-call svg { width: 1.15em; height: 1.15em; fill: currentColor; }
.reply-call:hover { background: var(--wl-orange-deep); }
.reply .hp { position: absolute; left: -9999px; }

@media (min-width: 700px) and (max-width: 1099px) {
  .cover-photo img { aspect-ratio: 16 / 9; }
  .cover-tags { aspect-ratio: 16 / 9; }
  .t1 { left: 22%; top: 72%; } .t2 { left: 48%; top: 40%; } .t3 { left: 52%; top: 84%; }
  .cover-h1 { padding: 1.8rem 32px 0; max-width: 18ch; }
  .cover-card { margin: 1.6rem 32px 0; max-width: 30rem; }
}

/* desktop: the photo takes the left three quarters and the quote card sits beside it on the
   page ground, never over the image. The frame keeps the comp's height (37.9vw); the photo
   is left-anchored, so its features sit at 1.327x their comp share of the frame width. */
@media (min-width: 1100px) {
  .cover { display: grid; grid-template-columns: minmax(0, 1fr) 25vw; align-items: center; }
  .cover-frame { aspect-ratio: auto; height: 37.9vw; }
  .cover-photo, .cover-photo img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-position: 0% 50%; }
  .cover-tags { inset: 0; height: 100%; aspect-ratio: auto; }
  .tag .leader { display: block; }
  .tag .lab { max-width: none; }
  .cover-h1 { position: absolute; left: 4.77%; top: 5.2%; width: 72%; padding: 0; font-size: 4.62vw; line-height: 0.92; letter-spacing: -0.03em; max-width: none; z-index: 2; text-wrap: wrap; }
  .tag .dot { position: relative; z-index: 1; width: 2.5vw; height: 2.5vw; font-size: 1.3vw; border-width: 0.16vw; }
  .tag .lab { font-size: 0.9vw; line-height: 1.12; padding: 0.45vw 0.6vw 0.45vw 0.85vw; margin-left: -0.05vw; margin-top: 0.5vw; }
  .tag button { gap: 0; }
  .t2 .lab { max-width: 9.6vw; } .t3 .lab { max-width: 8.2vw; }
  .reply-send { margin-bottom: -0.8vw; }
  .reply:focus-within .reply-send, .reply:has(input.reply-in:not(:placeholder-shown)) .reply-send, .reply:has(select.reply-in:valid) .reply-send { margin-bottom: 0; }
  .t1 { left: 50.7%; top: 70.2%; } .t1 .leader { left: 2.6vw; top: 2.5vw; height: 2.4vw; transform: rotate(-26deg); }
  .t2 { left: 72.6%; top: 43.3%; }
  .t3 { left: 77.6%; right: auto; top: 85.2%; } .t3 .lab { padding-top: 0.25vw; padding-bottom: 0.25vw; margin-top: 0.35vw; } .t3 .leader { left: 0.6vw; top: 2.3vw; height: 2.6vw; transform: rotate(48deg); }
  .cover-card { position: relative; margin: 0 1.55vw; width: auto; }
  .reply { padding: 1.1vw 1.4vw 1.5vw; gap: 0.8vw; }
  .reply-title { font-size: 2.86vw; margin-bottom: 0.1vw; }
  .reply-in { min-height: 2.73vw; height: 2.73vw; font-size: 1.02vw; padding: 0 0.95vw; }
  .reply-call { min-height: 3.45vw; height: 3.45vw; font-size: 1.32vw; letter-spacing: -0.012em; }
  .reply-submit { min-height: 2.9vw; font-size: 1.1vw; }
  .reply-note { font-size: 0.85vw; }
}

/* ---------------------------------------------------------------- department strip */
.living main > section.dept { padding: 1.6rem 20px 2.4rem; background: var(--wl-ground); }
.dept-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.dept-name { margin: 0; flex: none; font: 700 0.85rem/1 var(--wl-head); letter-spacing: 0.2em; text-transform: uppercase; color: var(--wl-orange); }
.dept-rule { flex: 1; height: 1px; background: #5F7380; }
.dept-grid { display: grid; gap: 1.6rem; }
.dept-lead h2 { margin: 0 0 0.8rem; font: 700 clamp(2.2rem, 1.7rem + 2.4vw, 3rem)/0.9 var(--wl-head); color: #090909; letter-spacing: -0.01em; text-wrap: balance; }
.dept-lede { margin: 0; font: 400 1.2rem/1.38 var(--wl-serif); color: var(--wl-ink-2); max-width: 34ch; }
.dept-fig { margin: 0; }
.dept-fig img { display: block; width: 100%; height: auto; aspect-ratio: 305 / 186; object-fit: cover; }
.dept-fig figcaption { margin-top: 0.4rem; padding-top: 0.45rem; border-top: 1px solid var(--wl-rule-ink); font: 400 1rem/1.4 var(--wl-serif); color: var(--wl-ink-3); }
.dept-fig figcaption b { display: block; font-family: var(--wl-serif); font-weight: 700; color: #0D182B; margin-bottom: 0.15rem; }
.dept-col-rule { display: none; }

@media (min-width: 700px) and (max-width: 1099px) {
  .living main > section.dept { padding: 2rem 32px 3rem; }
  .dept-grid { grid-template-columns: 1fr 1fr; }
  .dept-lead { grid-column: 1 / -1; }
}

@media (min-width: 1100px) {
  .living main > section.dept { padding: 1.82vw 2.15vw 2vw 2.41vw; }
  .dept-head { gap: 2vw; margin-bottom: 0.91vw; height: 1.04vw; }
  .dept-rule { position: relative; top: 0.2vw; }
  .dept-name { font-size: 1.04vw; letter-spacing: 0.13em; }
  .dept-grid { grid-template-columns: minmax(0,455fr) minmax(0,18fr) minmax(0,305fr) minmax(0,19fr) 1px minmax(0,22fr) minmax(0,290fr) minmax(0,19fr) 1px minmax(0,19fr) minmax(0,316fr); gap: 0; align-items: start; }
  .dept-lead { min-width: 0; }
  .dept-lead { grid-column: 1; }
  .dept-lead h2 { font-size: 3.72vw; line-height: 0.94; margin: 0.4vw 0 1.15vw; letter-spacing: -0.04em; white-space: nowrap; }
  .dept-lede { font-size: 1.3vw; line-height: 1.33; max-width: 26.1vw; letter-spacing: -0.015em; }
  .dept-fig.fa { grid-column: 3; } .dept-fig.fb { grid-column: 7; } .dept-fig.fc { grid-column: 11; }
  .dept-fig img { aspect-ratio: auto; height: 12.1vw; }
  .dept-fig figcaption { margin-top: 0.33vw; padding-top: 0.36vw; font-size: 1.08vw; line-height: 1.24; letter-spacing: -0.01em; }
  .dept-fig.fb figcaption, .dept-fig.fc figcaption { margin-top: 0.4vw; border-top-width: 2px; border-top-color: #6E7F8A; padding-top: 0.25vw; }
  .dept-fig figcaption .cap-body { display: block; max-width: 16.2vw; font-size: 1.02vw; line-height: 1.3; letter-spacing: -0.02em; }
  .dept-fig figcaption b { font-size: 1.04vw; margin-bottom: 0.35vw; }
  .dept-col-rule { display: block; width: 1px; height: 17.7vw; background: var(--wl-rule-ink); opacity: 0.55; }
  .dept-col-rule.r1 { grid-column: 5; } .dept-col-rule.r2 { grid-column: 9; }
}

/* ---------------------------------------------------------- before and after */
.living main > section.ba { padding: 2.4rem 20px 3rem; background: var(--wl-ground); }
.ba-head { margin-bottom: 1.1rem; }
.ba-head h2 { margin: 0 0 0.6rem; font: 700 clamp(2rem, 1.5rem + 2.2vw, 3.2rem)/0.95 var(--wl-head); letter-spacing: -0.03em; color: var(--wl-ink); }
.ba-lede { margin: 0; max-width: 46ch; font: 400 1.2rem/1.4 var(--wl-serif); color: var(--wl-ink-2); }
.ba-frame { position: relative; overflow: hidden; aspect-ratio: 2688 / 1024; background: #ddd; }
.ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { clip-path: inset(0 calc(100% - var(--ba)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--ba); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 6px rgba(10, 17, 28, 0.35); pointer-events: none; }
.ba-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: var(--wl-orange); border: 3px solid #fff; box-shadow: 0 4px 12px rgba(10, 17, 28, 0.3); }
.ba-tag { position: absolute; top: 14px; padding: 0.3rem 0.6rem; background: var(--wl-paper); font: 700 0.85rem var(--wl-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--wl-ink); pointer-events: none; }
.ba-tag-b { left: 14px; } .ba-tag-a { right: 14px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.ba-range:focus-visible + .ba-handle, .ba-frame:focus-within .ba-handle { background: var(--wl-orange); }
.ba-frame:focus-within { outline: 3px solid var(--wl-orange); outline-offset: 3px; }
.ba-cap { margin: 0.55rem 0 0; padding-top: 0.5rem; border-top: 1px solid var(--wl-rule-ink); font: 400 1rem/1.4 var(--wl-serif); color: var(--wl-ink-3); }
@media (max-width: 699px) { .ba-frame { aspect-ratio: 4 / 3; } }
@media (min-width: 1100px) {
  .living main > section.ba { padding: 4vw 2.41vw 4.5vw; }
  .ba-head { display: grid; grid-template-columns: minmax(0, 30vw) minmax(0, 1fr); column-gap: 3vw; align-items: end; margin-bottom: 1.6vw; }
  .ba-head h2 { font-size: 3.9vw; margin: 0; }
  .ba-lede { font-size: 1.35vw; max-width: 40vw; }
}

/* the one authored moment: the cover photograph settles in once */
@media (prefers-reduced-motion: no-preference) {
  .cover-photo img { animation: wl-settle 1.4s var(--wl-ease) both; }
  @keyframes wl-settle { from { opacity: 0.001; transform: scale(1.035); } to { opacity: 1; transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  .reply-send { transition: none; }
  .tag-note:not([hidden]) { animation: none; }
}
