/* Lewiston Tribune — Holiday Subscription Offer (tribuneholidaydeal.com)
   Palette taken from the print ad (Tribune_Holiday_Subscription_Ad 11-19-26.pdf). */

:root {
  --cream: #faf6ec;
  --paper: #fffdf7;
  --green: #1f4f37;
  --green-deep: #173d2a;
  --cranberry: #9b1b24;
  --cranberry-deep: #7c131b;
  --gold: #c9a24a;
  --gold-light: #e6c97e;
  --ink: #26231f;
  --muted: #5b564e;
  --rule: #e6dabb;

  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Green-and-gold rule across the top, echoing the ad's frame */
body::before {
  content: '';
  display: block;
  height: 11px;
  background: linear-gradient(var(--green) 0 7px, transparent 7px 9px, var(--gold) 9px 11px);
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 4vw, 48px);
  padding-top: 26px;
  padding-bottom: 6px;
}

.logo {
  width: clamp(220px, 52vw, 400px);
  height: auto;
}

.flakes {
  position: relative;
  flex: none;
  width: 78px;
  height: 72px;
  color: var(--gold);
}

.flake-lg,
.flake-sm {
  position: absolute;
}

.flake-lg {
  width: 52px;
  height: 52px;
  top: 0;
}

.flake-sm {
  width: 26px;
  height: 26px;
  bottom: 0;
}

.flakes-left .flake-lg { right: 4px; }
.flakes-left .flake-sm { left: 0; }
.flakes-right .flake-lg { left: 4px; }
.flakes-right .flake-sm { right: 0; }

/* ---------- Hero ---------- */

.hero {
  padding: 28px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-areas:
    'copy'
    'card'
    'cta';
  gap: 28px;
  text-align: center;
}

.hero-copy { grid-area: copy; }
.offer-card { grid-area: card; }
.hero-cta { grid-area: cta; }

.eyebrow {
  display: inline-block;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
  color: var(--green);
  font: 700 0.875rem/1.2 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0.45em 0 0.4em;
  color: var(--cranberry);
  font: 700 clamp(2.1rem, 1.25rem + 3.4vw, 3.6rem)/1.1 var(--serif);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.h1-accent {
  display: block;
  margin-top: 0.06em;
  font-size: 1.3em;
  font-style: italic;
  font-weight: 400;
  line-height: 1.05;
}

.lede {
  max-width: 34ch;
  margin: 0 auto;
  color: #3d3933;
  font: italic 400 1.15rem/1.55 var(--serif);
}

/* Offer card */

.offer-card {
  justify-self: center;
  width: 100%;
  max-width: 500px;
  padding: 9px;
  border-radius: 22px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 22px 44px -22px rgba(23, 61, 42, 0.6);
}

.offer-inner {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  column-gap: 22px;
  padding: 24px 24px 20px;
  border: 1.5px solid var(--gold);
  border-radius: 15px;
}

.offer-price,
.offer-terms {
  margin: 0;
}

.offer-price {
  text-align: center;
}

.offer-only {
  display: block;
  color: var(--gold-light);
  font: 700 0.95rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.offer-amount {
  display: block;
  font: 700 clamp(5rem, 3.6rem + 5vw, 7.25rem)/1 var(--serif);
  letter-spacing: -0.03em;
}

.offer-amount .cur {
  position: relative;
  top: -0.62em;
  margin-right: 0.02em;
  font-size: 0.45em;
}

.offer-terms {
  text-align: left;
}

.offer-terms span {
  display: block;
}

.offer-per {
  color: var(--gold-light);
  font: 700 1.3rem/1.2 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.offer-for {
  font: 600 1.2rem/1.3 var(--sans);
}

.offer-months {
  margin-top: 2px;
  white-space: nowrap;
  font: 700 clamp(1.8rem, 1.4rem + 1.6vw, 2.35rem)/1.05 var(--serif);
  text-transform: uppercase;
}

.offer-upfront {
  grid-column: 1 / -1;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(230, 201, 126, 0.5);
  font-weight: 600;
  text-align: center;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 58px;
  padding: 0 32px;
  border-radius: 12px;
  font: 700 1.125rem/1.2 var(--sans);
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.btn-icon {
  width: 1.15em;
  height: 1.15em;
  transition: transform 0.15s ease;
}

.btn:hover .btn-icon {
  transform: translateX(3px);
}

.btn-primary {
  background: var(--cranberry);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(155, 27, 36, 0.7);
}

.btn-primary:hover {
  background: var(--cranberry-deep);
  transform: translateY(-1px);
}

.btn-light {
  background: var(--cream);
  color: var(--cranberry);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.45);
}

.btn-light:hover {
  background: #fff;
  transform: translateY(-1px);
}

.btn-light:focus-visible {
  outline-color: #fff;
}

.btn-sm {
  min-height: 46px;
  padding: 0 20px;
  font-size: 1rem;
}

.hero-cta .btn {
  width: 100%;
  max-width: 420px;
}

.cta-note {
  margin: 12px 0 0;
  text-wrap: balance;
  color: var(--muted);
  font-size: 0.95rem;
}

.call-line {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.call-line a {
  color: var(--green);
  font-weight: 700;
  text-underline-offset: 3px;
}

/* ---------- Benefits ---------- */

.benefits {
  padding: 60px 0 68px;
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

.section-label {
  margin: 0;
  color: var(--cranberry);
  font: 700 0.95rem/1.2 var(--sans);
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.section-label::after {
  content: '';
  display: block;
  width: 64px;
  height: 2px;
  margin: 12px auto 0;
  background: var(--gold);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 30px 44px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.benefit-grid li {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 14px;
  align-items: start;
}

.check {
  width: 26px;
  height: 26px;
  margin-top: 1px;
  color: var(--cranberry);
}

.benefit-grid h3 {
  margin: 0 0 4px;
  color: var(--green);
  font: 700 1.125rem/1.3 var(--sans);
}

.benefit-grid p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Deadline band ---------- */

.deadline {
  position: relative;
  overflow: hidden;
  padding: 60px 0 64px;
  background: var(--cranberry);
  color: #fff;
  text-align: center;
}

.deadline h2 {
  margin: 0;
  font: 700 clamp(1.75rem, 1.1rem + 2.6vw, 2.9rem)/1.15 var(--serif);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.days-left {
  display: inline-block;
  margin: 16px 0 0;
  padding: 5px 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: var(--gold-light);
  font: 700 0.9rem/1.3 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deadline .btn {
  display: flex;
  width: 100%;
  max-width: 420px;
  margin: 28px auto 0;
}

.deadline-call {
  margin: 18px 0 0;
  color: var(--gold-light);
  font: 700 1.2rem/1.4 var(--sans);
}

.deadline-call a {
  white-space: nowrap;
  text-underline-offset: 4px;
}

.deadline-flake {
  position: absolute;
  color: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.deadline-flake svg {
  width: 100%;
  height: 100%;
}

.deadline-flake-a {
  top: -30px;
  left: -40px;
  width: 220px;
  height: 220px;
}

.deadline-flake-b {
  right: -30px;
  bottom: -50px;
  width: 180px;
  height: 180px;
}

/* ---------- Fine print & footer ---------- */

.fine-print {
  padding: 40px 0 28px;
}

.fine-print .wrap {
  max-width: 820px;
  text-align: center;
}

.fine-print h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font: 700 0.8rem/1.2 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fine-print p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.site-footer {
  padding: 18px 0 28px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

/* ---------- Sticky mobile CTA ---------- */

.sticky-cta {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  background: rgba(255, 253, 247, 0.97);
  box-shadow: 0 -10px 24px -14px rgba(0, 0, 0, 0.3);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}

.sticky-cta.is-visible {
  transform: none;
  visibility: visible;
  transition: transform 0.25s ease;
}

.sticky-offer {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
}

.sticky-offer strong {
  display: block;
  color: var(--cranberry);
  font: 700 1.15rem/1.2 var(--serif);
}

/* ---------- Responsive ---------- */

@media (max-width: 719px) {
  .site-footer {
    padding-bottom: 96px;
  }
}

@media (min-width: 720px) {
  .sticky-cta {
    display: none;
  }
}

@media (max-width: 560px) {
  .flakes {
    width: 30px;
    height: 34px;
  }

  .flake-lg {
    width: 28px;
    height: 28px;
    top: 3px;
  }

  .flakes-left .flake-lg,
  .flakes-right .flake-lg {
    left: 0;
    right: auto;
  }

  .flake-sm {
    display: none;
  }

  .header-row {
    padding-top: 18px;
  }

  .hero {
    padding-top: 18px;
  }

  .hero-grid {
    gap: 22px;
  }

  h1 {
    margin: 0.4em 0 0.3em;
  }

  .offer-inner {
    column-gap: 14px;
    padding: 18px 14px 16px;
  }

  .offer-amount {
    font-size: 4.5rem;
  }

  .offer-per {
    font-size: 1.05rem;
  }

  .offer-for {
    font-size: 1rem;
  }

  .offer-months {
    font-size: 1.55rem;
  }

  .offer-upfront {
    margin-top: 14px;
    padding-top: 12px;
    font-size: 0.95rem;
  }
}

@media (min-width: 920px) {
  .hero {
    padding: 36px 0 76px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-areas:
      'copy card'
      'cta  card';
    column-gap: 56px;
    row-gap: 30px;
    align-items: center;
    text-align: left;
  }

  .hero-copy {
    align-self: end;
  }

  .hero-cta {
    align-self: start;
  }

  .lede {
    margin: 0;
  }

  .offer-card {
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-icon,
  .sticky-cta {
    transition: none;
  }

  .btn:hover,
  .btn:hover .btn-icon {
    transform: none;
  }
}
