:root {
  --ink: #17313a;
  --muted: #5e7074;
  --line: #d9e3df;
  --paper: #fbfcfa;
  --white: #ffffff;
  --sage: #8fb6a2;
  --teal: #2f7d7a;
  --deep: #123b40;
  --rose: #c75f7c;
  --blush: #fff5f7;
  --plum: #743548;
  --clay: #b98367;
  --shadow: 0 24px 70px rgba(21, 53, 56, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  color: var(--white);
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(255, 250, 251, 0.94);
  box-shadow: 0 10px 36px rgba(18, 59, 64, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  background: rgba(199, 95, 124, 0.16);
  font-size: 12px;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 3vw, 32px);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 120px clamp(20px, 6vw, 78px) 74px;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 48, 52, 0.84), rgba(15, 48, 52, 0.48) 48%, rgba(15, 48, 52, 0.18)),
    linear-gradient(0deg, rgba(9, 33, 35, 0.42), transparent 45%);
}

.hero-content {
  position: relative;
  max-width: 760px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd9e4;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 650;
  line-height: 1.03;
}

h1 {
  max-width: 840px;
  margin-bottom: 22px;
  font-size: 86px;
}

h2 {
  margin-bottom: 0;
  font-size: 56px;
}

h3 {
  font-size: 22px;
  line-height: 1.18;
}

.hero-copy {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 21px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  border-color: #ffd9e4;
  background: #ffd9e4;
  color: var(--plum);
}

.button.secondary {
  color: var(--white);
}

.intro-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.pillar {
  min-height: 210px;
  padding: clamp(24px, 4vw, 44px);
  background: var(--white);
}

.pillar span,
.tag,
.tip-list span {
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pillar strong {
  display: block;
  margin: 20px 0 10px;
  font-size: 22px;
}

.pillar p,
.about-copy p,
.article-card p,
.video-copy p,
.tip-list p,
.subscribe-band p,
.site-footer {
  color: var(--muted);
  line-height: 1.65;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(30px, 6vw, 78px);
  padding: clamp(64px, 9vw, 116px) clamp(20px, 6vw, 78px);
  background: #fffafd;
  border-bottom: 1px solid #efd5dc;
}

.about-heading {
  max-width: 560px;
}

.about-photo {
  margin: 28px 0 0;
}

.about-photo img {
  display: block;
  width: min(100%, 360px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border: 8px solid var(--white);
  box-shadow: var(--shadow);
}

.about-copy {
  padding: clamp(26px, 4vw, 42px);
  border-left: 4px solid var(--rose);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(21, 53, 56, 0.05);
}

.about-copy p {
  margin-bottom: 18px;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-signoff {
  color: var(--plum);
  font-weight: 800;
}

.section-shell {
  padding: clamp(64px, 9vw, 116px) clamp(20px, 6vw, 78px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 36px;
}

.article-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 18px;
}

.article-card {
  min-height: 286px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(21, 53, 56, 0.05);
}

.article-card h3 {
  margin: 18px 0 12px;
}

.article-card a {
  margin-top: 22px;
  color: var(--rose);
  font-weight: 800;
  text-decoration: none;
}

.feature-card {
  grid-row: span 2;
  min-height: 590px;
  background: linear-gradient(150deg, var(--deep), var(--plum));
  color: var(--white);
  box-shadow: var(--shadow);
}

.feature-card p {
  color: rgba(255, 255, 255, 0.78);
}

.feature-card .tag {
  color: #ffd9e4;
}

.feature-card a {
  color: var(--white);
}

.library-section {
  padding: clamp(64px, 9vw, 116px) clamp(20px, 6vw, 78px);
  background: #fffafd;
  border-top: 1px solid #efd5dc;
}

.library-controls {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.library-controls label {
  color: var(--deep);
  font-size: 13px;
  font-weight: 800;
}

.library-controls input {
  max-width: 760px;
  border-color: #dfc8d0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #dfc8d0;
  background: var(--white);
  color: var(--plum);
  font-size: 14px;
}

.filter-button.is-active {
  border-color: var(--plum);
  background: var(--plum);
  color: var(--white);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.library-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(21, 53, 56, 0.05);
}

.library-card.is-hidden {
  display: none;
}

.library-card > span {
  width: fit-content;
  padding: 5px 9px;
  background: var(--blush);
  color: var(--plum);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.library-card h3 {
  margin: 14px 0 10px;
}

.library-card p:not(.tag) {
  color: var(--muted);
  line-height: 1.65;
}

.library-card a {
  color: var(--rose);
  font-weight: 800;
  text-decoration: none;
}

.library-empty {
  margin: 24px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.video-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(58px, 8vw, 96px) clamp(20px, 6vw, 78px);
  background: var(--blush);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.video-panel {
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  gap: 22px;
  padding: 30px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(18, 59, 64, 0.94), rgba(116, 53, 72, 0.7)),
    url("assets/local-devon-hero.png") center / cover;
  box-shadow: var(--shadow);
}

.play-button {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.18);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.video-panel h3,
.video-panel p {
  margin-bottom: 6px;
}

.video-panel p {
  color: rgba(255, 255, 255, 0.82);
}

.quote-section {
  padding: clamp(56px, 8vw, 104px) clamp(20px, 12vw, 160px);
  background: linear-gradient(135deg, var(--deep), var(--plum));
}

blockquote {
  max-width: 1060px;
  margin: 0 auto;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
  line-height: 1.16;
  text-align: center;
}

.training-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: center;
  padding: clamp(58px, 8vw, 96px) clamp(20px, 6vw, 78px);
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.training-copy {
  padding: 30px;
  border-left: 4px solid var(--rose);
  background: var(--blush);
}

.training-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.training-copy a {
  color: var(--plum);
  font-weight: 800;
  text-decoration: none;
}

.tips-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(30px, 6vw, 78px);
}

.tip-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tip-list article {
  min-height: 220px;
  padding: 28px;
  border-left: 4px solid var(--rose);
  background: var(--white);
}

.tip-list article:nth-child(2) {
  border-color: var(--sage);
}

.tip-list article:nth-child(3) {
  border-color: var(--teal);
}

.tip-list article:nth-child(4) {
  border-color: var(--clay);
}

.tip-list h3 {
  margin: 18px 0 10px;
}

.subscribe-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: clamp(26px, 5vw, 64px);
  align-items: end;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 6vw, 78px);
  background: var(--blush);
  border-top: 1px solid #efd5dc;
}

.subscribe-form {
  display: grid;
  gap: 10px;
}

.subscribe-form label {
  color: var(--deep);
  font-size: 13px;
  font-weight: 800;
}

.subscribe-form div {
  display: flex;
  gap: 10px;
}

.social-link {
  color: var(--rose);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.social-link:hover {
  color: var(--plum);
}

input,
button {
  min-height: 50px;
  border: 1px solid #cfd9d4;
  font: inherit;
}

input {
  width: 100%;
  padding: 0 14px;
  color: var(--ink);
  background: var(--white);
}

button {
  padding: 0 18px;
  border-color: var(--plum);
  background: var(--plum);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.article-header {
  position: sticky;
  color: var(--ink);
  background: rgba(255, 250, 251, 0.96);
  box-shadow: 0 10px 36px rgba(18, 59, 64, 0.12);
  backdrop-filter: blur(18px);
}

.article-page {
  background: var(--paper);
}

.article-hero {
  padding: 150px clamp(20px, 8vw, 132px) 70px;
  background:
    linear-gradient(90deg, rgba(18, 59, 64, 0.88), rgba(116, 53, 72, 0.62)),
    url("assets/local-devon-hero.png") center / cover;
  color: var(--white);
}

.article-hero.tablets-hero {
  background:
    linear-gradient(90deg, rgba(18, 36, 40, 0.9), rgba(116, 53, 72, 0.64)),
    url("assets/sleeping-tablets-hero.png") center / cover;
}

.article-hero .eyebrow {
  color: #ffd9e4;
}

.article-hero h1 {
  max-width: 980px;
  font-size: 74px;
}

.article-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 22px;
  line-height: 1.55;
}

.article-body {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 84px) 20px;
}

.article-body section {
  margin-bottom: 48px;
}

.article-body .lead {
  color: var(--deep);
  font-size: 24px;
  line-height: 1.55;
}

.article-body h2 {
  margin: 0 0 18px;
  font-size: 42px;
}

.article-body h3 {
  margin: 28px 0 10px;
}

.article-body p,
.article-body li {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
}

.takeaway,
.notebook-panel {
  padding: clamp(24px, 4vw, 36px);
  background: var(--blush);
  border-left: 4px solid var(--rose);
}

.sleep-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 28px;
  padding: clamp(20px, 4vw, 32px);
  background: var(--blush);
  border-left: 4px solid var(--rose);
}

.sleep-visual-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
}

.sleep-visual-card span,
.routine-strip span {
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sleep-visual-card h3 {
  margin: 0;
}

.sleep-visual-card p,
.routine-strip p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.sleep-visual-plus {
  align-self: center;
  color: var(--rose);
  font-size: 30px;
  font-weight: 800;
}

.sleep-visual-result {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--deep), var(--plum));
  color: var(--white);
  font-size: 20px;
}

.sleep-visual-result span {
  color: #ffd9e4;
  font-size: 26px;
  font-weight: 800;
}

.pressure-meter {
  position: relative;
  height: 18px;
  overflow: hidden;
  background: #f1dce3;
}

.pressure-meter i {
  display: block;
  width: 72%;
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--plum));
}

.clock-face {
  position: relative;
  width: 74px;
  height: 74px;
  border: 5px solid #f1dce3;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--white) 0 55%, #fff5f7 56%);
}

.clock-face::before,
.clock-face::after,
.clock-face i {
  position: absolute;
  content: "";
  left: 50%;
  top: 50%;
  transform-origin: left center;
  background: var(--plum);
}

.clock-face::before {
  width: 23px;
  height: 3px;
  transform: rotate(0deg);
}

.clock-face::after {
  width: 18px;
  height: 3px;
  transform: rotate(-70deg);
}

.clock-face i {
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.routine-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0 34px;
  background: #efd5dc;
  border: 1px solid #efd5dc;
}

.routine-strip article {
  min-height: 160px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
  background: var(--white);
}

.routine-strip strong {
  color: var(--plum);
  font-size: 18px;
}

.tablet-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin: 34px 0 54px;
  padding: clamp(20px, 4vw, 32px);
  background: var(--blush);
  border-left: 4px solid var(--rose);
}

.tablet-visual article {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--white);
}

.tablet-visual span {
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.tablet-visual h2 {
  margin: 0;
  font-size: 30px;
}

.tablet-visual p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.tablet-visual-arrow {
  align-self: center;
  color: var(--rose);
  font-size: 32px;
  font-weight: 800;
}

.tablet-icon {
  position: relative;
  width: 92px;
  height: 54px;
  border: 2px solid #dfc8d0;
  background: linear-gradient(90deg, #f8ecef 0 50%, var(--white) 50%);
}

.tablet-icon::before,
.tablet-icon::after,
.tablet-icon i {
  position: absolute;
  content: "";
  border: 1px solid #dfc8d0;
  background: var(--white);
}

.tablet-icon::before {
  inset: 9px 52px 9px 10px;
}

.tablet-icon::after {
  inset: 9px 10px 9px 52px;
}

.tablet-icon i {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  border: 0;
  background: #dfc8d0;
}

.pattern-icon {
  display: flex;
  gap: 8px;
  align-items: end;
  height: 58px;
}

.pattern-icon i {
  width: 22px;
  background: linear-gradient(180deg, var(--rose), var(--plum));
}

.pattern-icon i:nth-child(1) {
  height: 26px;
}

.pattern-icon i:nth-child(2) {
  height: 42px;
}

.pattern-icon i:nth-child(3) {
  height: 58px;
}

.myth-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.myth-list article,
.resource-grid article,
.notebook-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--white);
}

.resource-panel {
  padding: clamp(24px, 4vw, 36px);
  background: var(--blush);
  border-left: 4px solid var(--rose);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.resource-grid a {
  color: var(--rose);
  font-weight: 800;
  text-decoration: none;
}

.article-quote {
  margin: 54px 0;
  padding: clamp(28px, 5vw, 46px);
  background: linear-gradient(135deg, var(--deep), var(--plum));
  color: var(--white);
  font-size: 38px;
  text-align: left;
}

.notebook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.article-sources {
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.article-sources a {
  color: var(--rose);
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 6vw, 78px);
  background: var(--white);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .intro-band,
  .about-section,
  .article-grid,
  .library-grid,
  .video-band,
  .training-band,
  .tips-layout,
  .subscribe-band {
    grid-template-columns: 1fr;
  }

  .feature-card {
    grid-row: auto;
    min-height: 340px;
  }

  h1 {
    font-size: 62px;
  }

  h2 {
    font-size: 44px;
  }

  .article-hero h1 {
    font-size: 54px;
  }

  .sleep-visual,
  .routine-strip,
  .tablet-visual,
  .myth-list,
  .resource-grid,
  .notebook-grid {
    grid-template-columns: 1fr;
  }

  .sleep-visual-plus,
  .tablet-visual-arrow {
    justify-self: center;
  }

  blockquote {
    font-size: 40px;
  }
}

@media (max-width: 620px) {
  .site-header {
    display: grid;
  }

  .brand {
    max-width: 100%;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .about-photo img {
    width: 100%;
    max-width: 340px;
  }

  .hero {
    min-height: 88vh;
    padding-top: 150px;
  }

  h1 {
    font-size: 45px;
  }

  h2 {
    font-size: 36px;
  }

  .hero-copy {
    font-size: 18px;
  }

  blockquote {
    font-size: 31px;
  }

  .article-hero {
    padding-top: 132px;
  }

  .article-hero h1 {
    font-size: 42px;
  }

  .article-hero p,
  .article-body .lead {
    font-size: 18px;
  }

  .article-body h2 {
    font-size: 34px;
  }

  .article-body p,
  .article-body li {
    font-size: 16px;
  }

  .tip-list {
    grid-template-columns: 1fr;
  }

  .subscribe-form div,
  .site-footer {
    display: grid;
  }
}
