/* ==========================================================================
   Daily Doze — homepage theme
   Bootstrap 5 is the base grid/component layer; this file carries the style.
   ========================================================================== */

/* ------------------------------- 1. Tokens ------------------------------- */
:root {
  --dd-cream:      #F7F3E8;
  --dd-cream-deep: #F1EBDC;
  --dd-ink:        #12253F;
  --dd-accent:     #D84A26;
  --dd-rule:       rgba(18, 37, 63, .28);
  --dd-rule-soft:  rgba(18, 37, 63, .16);
  --dd-muted:      rgba(18, 37, 63, .72);

  --dd-display: "Roboto Slab", Georgia, "Times New Roman", serif;
  --dd-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --dd-gutter: 1.75rem;
}

/* --------------------------- 2. Base elements ---------------------------- */
* { -webkit-font-smoothing: antialiased; }

body {
  background-color: var(--dd-cream);
  color: var(--dd-ink);
  font-family: var(--dd-mono);
  font-size: .8125rem;
  line-height: 1.85;
  letter-spacing: .01em;
}

.container-xl { max-width: 1200px; padding-inline: 1.25rem; }

a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--dd-accent); }

::selection { background: var(--dd-accent); color: var(--dd-cream); }

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

.skip-link {
  position: absolute; top: .5rem; left: .5rem; z-index: 1100;
  background: var(--dd-ink); color: var(--dd-cream);
  padding: .5rem .9rem; font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase;
}

.top-rule { height: 6px; background: var(--dd-ink); }

.display-slab {
  font-family: var(--dd-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: -.015em;
  margin: 0;
}

.text-accent { color: var(--dd-accent); }

.arrow { display: inline-block; transition: transform .25s ease; }

.rule-short {
  width: min(340px, 100%);
  margin: 2rem 0 1.75rem;
  border: 0;
  border-top: 1px solid var(--dd-rule);
  opacity: 1;
}

/* ------------------------------ 3. Buttons ------------------------------- */
.btn-outline-ink {
  --bs-btn-padding-y: .8rem;
  --bs-btn-padding-x: 1.4rem;
  border: 1.5px solid var(--dd-ink);
  border-radius: 0;
  background: transparent;
  color: var(--dd-ink);
  font-family: var(--dd-mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background-color .25s ease, color .25s ease;
}
.btn-outline-ink:hover,
.btn-outline-ink:focus-visible {
  background: var(--dd-ink);
  color: var(--dd-cream);
}
.btn-outline-ink:hover .arrow { transform: translateX(5px); }
.btn-lg-cta { --bs-btn-padding-y: .95rem; --bs-btn-padding-x: 1.9rem; }
.btn-lg-cta .arrow { margin-left: 2.5rem; color: var(--dd-accent); }
.btn-lg-cta:hover .arrow { color: var(--dd-cream); }

/* ------------------------------- 4. Header ------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--dd-cream);
  border-bottom: 1px solid var(--dd-rule);
}
.site-header .navbar { padding-block: .1rem !important; }

.brand-word {
  font-family: var(--dd-display);
  font-weight: 900;
  font-size: 1.75rem;
  line-height: .88;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--dd-ink);
}
.brand-word-sm { font-size: 1.4rem; }
.brand-mark { width: 118px; height: auto; }
.brand-mark-sm { width: 96px; }

.navbar-nav { gap: 2rem; }
.navbar .nav-link {
  position: relative;
  padding: .25rem 0;
  color: var(--dd-ink);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -.35rem;
  height: 2px;
  background: var(--dd-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.navbar .nav-link:hover,
.navbar .nav-link.active { color: var(--dd-ink); }
.navbar .nav-link.active::after,
.navbar .nav-link:hover::after { transform: scaleX(1); }

.navbar-toggler {
  border: 1.5px solid var(--dd-ink);
  border-radius: 0;
  padding: .5rem .6rem;
  box-shadow: none !important;
}
.toggler-bars { display: block; width: 20px; }
.toggler-bars i { display: block; height: 1.5px; background: var(--dd-ink); }
.toggler-bars i + i { margin-top: 4px; }

/* -------------------------------- 5. Hero ------------------------------- */
.section-hero { padding-block: clamp(2.5rem, 5vw, 4rem); }

.hero-title { font-size: clamp(2.5rem, 6.2vw, 4.5rem); }

.lead-mono {
  max-width: 30rem;
  margin-bottom: 2.25rem;
  color: var(--dd-muted);
  font-size: .875rem;
  line-height: 1.95;
}

.hero-stage { position: relative; }
.hero-slides {
  position: relative;
  aspect-ratio: 520 / 420;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.015);
  transition: opacity .55s ease, transform .55s ease, visibility .55s ease;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; visibility: visible; transform: none; }

.hero-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
  margin-top: 1.75rem;
}
.hero-dot {
  border: 0;
  background: none;
  padding: 0;
  color: var(--dd-muted);
  font-family: var(--dd-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  transition: color .2s ease;
}
.hero-dot:hover { color: var(--dd-ink); }
.hero-dot.is-active { color: var(--dd-accent); }
.hero-pager-line {
  flex: 0 1 88px;
  height: 1px;
  background: var(--dd-rule);
  margin-inline: -.35rem;
}

/* ------------------------- 6. Section scaffolding ----------------------- */
.section-block {
  padding-block: clamp(2.75rem, 5vw, 4.25rem);
  border-top: 1px solid var(--dd-rule);
}

.section-aside { padding-right: var(--dd-gutter); }
.section-label { font-size: 1.375rem; letter-spacing: 0; }
.aside-arrow {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--dd-accent);
  font-size: 1.25rem;
  line-height: 1;
}

/* ------------------------------ 7. Services ----------------------------- */
.service {
  height: 100%;
  padding-inline: var(--dd-gutter);
  border-left: 1px solid var(--dd-rule-soft);
}
.service-icon { width: 38px; height: 38px; margin-bottom: 2.5rem; }
.service-title {
  margin-bottom: 1.25rem;
  font-family: var(--dd-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.service-copy {
  margin: 0;
  color: var(--dd-muted);
  font-size: .75rem;
  line-height: 2;
}

/* -------------------------------- 8. Work ------------------------------- */
.work-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--dd-rule-soft);
  background: var(--dd-cream-deep);
  transition: border-color .25s ease, transform .25s ease;
}
.work-card:hover { border-color: var(--dd-ink); transform: translateY(-4px); }
.work-card:hover .arrow { transform: translateX(5px); color: var(--dd-accent); }

.work-thumb {
  position: relative;
  display: block;
  aspect-ratio: 200 / 176;
  overflow: hidden;
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-index {
  position: absolute;
  top: .6rem;
  left: .6rem;
  padding: .1rem .45rem;
  border: 1px solid var(--dd-accent);
  background: rgba(247, 243, 232, .9);
  color: var(--dd-accent);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.5;
}

.work-meta {
  display: block;
  padding: 1rem 1rem 1.1rem;
  border-top: 1px solid var(--dd-rule-soft);
  background: var(--dd-cream);
}
.work-name {
  display: block;
  margin-bottom: .35rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.work-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.work-cat { color: var(--dd-muted); font-size: .75rem; }
.work-foot .arrow { color: var(--dd-ink); }

/* ------------------------------- 9. Footer ------------------------------ */
.site-footer { border-top: 1px solid var(--dd-rule); }
.site-footer > .container-xl { padding-block: clamp(2.75rem, 5vw, 4rem); }

.footer-copy {
  max-width: 24rem;
  margin-bottom: 1.75rem;
  color: var(--dd-muted);
  font-size: .75rem;
  line-height: 2;
}

.footer-head {
  margin-bottom: 1.5rem;
  font-family: var(--dd-mono);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.footer-list { color: var(--dd-muted); font-size: .75rem; font-style: normal; line-height: 2.4; }
.footer-list a:hover { color: var(--dd-accent); }

.social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--dd-rule);
  border-radius: 50%;
  transition: background-color .25s ease, border-color .25s ease;
}
.social-list a:hover { background: rgba(216, 74, 38, .12); border-color: var(--dd-accent); }
.social-list img { width: 16px; height: 16px; }

.newsletter-field {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--dd-ink);
}
.newsletter-field .form-control {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--dd-ink);
  font-family: var(--dd-mono);
  font-size: .75rem;
  padding: .7rem .85rem;
}
.newsletter-field .form-control::placeholder { color: rgba(18, 37, 63, .45); }
.newsletter-btn {
  flex: 0 0 auto;
  border: 0;
  border-left: 1.5px solid var(--dd-ink);
  background: transparent;
  color: var(--dd-ink);
  padding-inline: .95rem;
  transition: background-color .25s ease, color .25s ease;
}
.newsletter-btn:hover { background: var(--dd-ink); color: var(--dd-cream); }
.newsletter-field.is-invalid { border-color: var(--dd-accent); }
.newsletter-msg {
  margin: .6rem 0 0;
  min-height: 1.1rem;
  font-size: .6875rem;
  letter-spacing: .04em;
}
.newsletter-msg.is-error { color: var(--dd-accent); }
.newsletter-msg.is-ok { color: var(--dd-muted); }

.footer-bar {
  background: var(--dd-ink);
  color: var(--dd-cream);
  padding-block: .95rem;
  font-size: .6875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ------------------------- 10. Reveal animation ------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide { transition: none; }
  .arrow { transition: none; }
}

/* --------------------------- 11. Responsive ----------------------------- */
@media (max-width: 1199.98px) {
  .service { padding-inline: 1.25rem; }
}

@media (min-width: 992px) {
  .footer-divider { border-left: 1px solid var(--dd-rule-soft); padding-left: 3rem; }
}

@media (max-width: 991.98px) {
  .navbar-nav { gap: .35rem; }
  .navbar .nav-link { padding-block: .45rem; }
  .navbar .nav-link::after { bottom: .1rem; right: auto; width: 2.25rem; }

  .section-aside {
    padding-right: 0;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
  }
  .aside-arrow { margin-top: 0; }

  .service {
    border-left: 0;
    border-top: 1px solid var(--dd-rule-soft);
    padding: 1.5rem 0 0;
  }
  .service-icon { margin-bottom: 1.25rem; }

  .hero-pager { justify-content: flex-start; }
}

@media (max-width: 575.98px) {
    .brand-mark {
        max-width: 60px;
    }
  .footer-bar { letter-spacing: .08em; text-align: left; }
  .site-header .navbar {
    padding-block: 0px !important;
  }
}

/* ------------------- 12. Dailypeople / Dailyspot ------------------------- */
/* Both pages reuse .work-card and .service; these are the few rules the
   reused blocks do not already cover. */

.nav-ext { font-size: .75em; margin-left: .3em; opacity: .55; }

.person-thumb { aspect-ratio: 1; }

/* A member with no portrait: the initial fills the same square so a
   half-populated team grid still lines up. */
.person-initial {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--dd-cream-deep);
  font-family: var(--dd-display);
  font-weight: 900;
  font-size: 3rem;
  color: var(--dd-rule);
  text-transform: uppercase;
}

.person-bio {
  padding: 0 var(--dd-gutter) var(--dd-gutter);
  color: var(--dd-muted);
  font-size: .75rem;
}
.person-bio p:last-child { margin-bottom: 0; }

.source-link {
  display: inline-block;
  margin-top: .75rem;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.source-link:hover .arrow { transform: translateX(5px); }

.spot {
  border: 1px solid var(--dd-rule-soft);
  padding: var(--dd-gutter);
  height: 100%;
}
.spot-address { color: var(--dd-muted); font-size: .8125rem; margin-top: .75rem; }
.spot-address p:last-child { margin-bottom: 0; }

/* The one page whose body is editor-written HTML rather than fielded copy. */
.prose { color: var(--dd-muted); max-width: 70ch; }
.prose p:last-child { margin-bottom: 0; }
/* "Coming soon" is real text, not a rule: --dd-rule is 1.77:1 on cream and
   fails AA at 12px, so the muted token is used instead (5.9:1). */
.source-link.is-muted { color: var(--dd-muted); cursor: default; }

/* ------------------------- 13. Dailynews article ------------------------- */
/* The post body is editor-written HTML, so these rules have to hold for
   markup this stylesheet never saw. */

.post-hero { width: 100%; height: auto; display: block; border: 1px solid var(--dd-rule-soft); }

/* The measure is set on the paragraphs, not the wrapper: capping the wrapper
   caps the figures too, and a pull-quote that cannot grow past the text column
   is not a pull-quote. */
.post-body { color: var(--dd-muted); }
.post-body p { margin-bottom: 1.25rem; max-width: 68ch; }
.post-body p:last-child { margin-bottom: 0; }

/* Any image an editor pastes in, at any intrinsic size, stays in the column. */
.post-body img { max-width: 100%; height: auto; display: block; }

/* A pull-quote breaks out of the measure, because it is meant to interrupt. */
.post-figure {
  margin: 2.5rem 0;
  max-width: min(100%, 52rem);
}
.post-figure img { width: 100%; }
.post-figure figcaption {
  margin-top: .6rem;
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dd-muted);
}

/* Sources. Set apart from the body so it reads as apparatus, not argument. */
.post-sources {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--dd-ink);
  max-width: 68ch;
}
.post-sources h2 {
  font-family: var(--dd-mono);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dd-accent);
  margin-bottom: .9rem;
}
.post-sources ul { list-style: none; padding: 0; margin: 0; }
.post-sources li {
  font-size: .75rem;
  line-height: 1.7;
  padding: .35rem 0 .35rem 1.1rem;
  position: relative;
}
.post-sources li::before {
  content: "\2197";                 /* leaves the site */
  position: absolute; left: 0;
  color: var(--dd-accent);
}
.post-sources a { color: var(--dd-ink); border-bottom: 1px solid var(--dd-rule-soft); }
.post-sources a:hover { color: var(--dd-accent); border-bottom-color: currentColor; }
.post-sources-note {
  margin: 1rem 0 0;
  font-size: .6875rem;
  color: var(--dd-muted);
}

/* ------------------- 14. Dailynews listing + article --------------------- */

/* The news card carries a standfirst and a date, which the portfolio card has
   no room for. Same frame, more inside it. */
.post-card .work-meta { gap: .5rem; }
.post-card-excerpt {
  display: block;
  color: var(--dd-muted);
  font-size: .75rem;
  line-height: 1.7;
}
.post-card-byline { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.post-card-author { color: var(--dd-muted); }
.post-card-byline time { color: var(--dd-rule); white-space: nowrap; }
.post-card-byline time::before { content: "\00b7"; margin-right: .5rem; }
.post-card-byline > :first-child::before { content: none; }

.post-back { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.25rem; }
.post-back a { color: var(--dd-muted); }
.post-back a:hover { color: var(--dd-accent); }
.post-back a:hover .arrow { transform: translateX(-4px); }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--dd-rule-soft);
}
.post-nav-right { text-align: right; }
.post-nav-label {
  display: block;
  font-size: .6875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dd-accent);
  margin-bottom: .35rem;
}
.post-nav-title {
  display: block;
  font-family: var(--dd-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--dd-ink);
}
.post-nav a:hover .post-nav-title { color: var(--dd-accent); }

/* Bootstrap's pager, brought into the site's type. Without this it is the
   framework's default blue pills against a cream serif page. */
.pagination { gap: .4rem; margin: 0; }
.page-link {
  border: 1px solid var(--dd-rule-soft);
  background: transparent;
  color: var(--dd-ink);
  font-family: var(--dd-mono);
  font-size: .75rem;
  padding: .45rem .8rem;
  border-radius: 0;
}
.page-link:hover { background: var(--dd-cream-deep); color: var(--dd-accent); border-color: var(--dd-rule); }
.page-link:focus { box-shadow: none; outline: 2px solid var(--dd-accent); outline-offset: 2px; }
.page-item.active .page-link {
  background: var(--dd-ink);
  border-color: var(--dd-ink);
  color: var(--dd-cream);
}
.page-item.disabled .page-link { color: var(--dd-rule); background: transparent; border-color: var(--dd-rule-soft); }

@media (max-width: 575.98px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-right { text-align: left; }
}
