:root {
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
          Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 280px;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

.site-shell {
  width: min(100%, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding-inline: 34px;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  font-size: 13px;
  font-weight: 600;
}

.brand {
  font-weight: 700;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.desktop-nav a,
.back-link,
.brand {
  transition: opacity .18s ease;
}

.desktop-nav a:hover,
.back-link:hover,
.brand:hover {
  opacity: .66;
}

.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav nav {
  position: absolute;
  right: 0;
  top: 34px;
  z-index: 10;
  min-width: 180px;
  padding: 12px;
  border-radius: 14px;
  display: grid;
  gap: 4px;
  background: currentColor;
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
}

.mobile-nav nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--mobile-menu-text, #fff);
  font-weight: 650;
}

.mobile-nav nav a:hover {
  background: rgba(255,255,255,.13);
}

.eyebrow,
.card-kicker,
.section-label {
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: .035em;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(42px, 5vw, 66px);
  line-height: .98;
  letter-spacing: -.045em;
}

.lead {
  max-width: 680px;
  font-size: 17px;
  line-height: 1.42;
}

/* ---------- Home and About ---------- */

.home-theme {
  --page-bg: #6c3930;
  --ink: #08275d;
  --soft-blue: #aecbe0;
  --mustard: #aba060;
  --card: #412a29;
  --footer: #08265c;
  --line: rgba(174, 203, 224, .38);
  --mobile-menu-text: #f4ead4;
  background: var(--page-bg);
  color: var(--soft-blue);
}

.home-theme .site-header {
  color: #b9cede;
  border-color: rgba(185, 206, 222, .24);
}

.home-theme .brand {
  color: #d4dee7;
}

.home-main {
  padding-top: 56px;
}

.home-hero {
  min-height: 252px;
  padding: 30px 18px 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 60px;
  border-bottom: 1px solid var(--line);
}

.home-hero .eyebrow,
.home-section .section-label {
  color: var(--mustard);
}

.home-hero h1 {
  max-width: 700px;
  margin: 20px 0 20px;
  color: var(--ink);
  font-size: clamp(40px, 5vw, 58px);
}

.home-hero .lead {
  max-width: 590px;
}

.pebbles {
  width: 150px;
  justify-self: end;
  display: grid;
}

.pebbles span {
  display: block;
  width: 150px;
  height: 70px;
  margin-top: -9px;
  border-radius: 999px;
  background: var(--mustard);
}

.home-section {
  padding: 46px 18px 72px;
}

.home-section .section-label {
  margin-bottom: 22px;
}

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

.feature-card {
  min-height: 162px;
  padding: 20px;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card);
  transition: transform .18s ease, box-shadow .18s ease;
}

.feature-card:hover,
.form-link:hover,
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(0,0,0,.12);
}

.feature-card strong {
  color: var(--mustard);
  font-size: 18px;
  line-height: 1.2;
}

.feature-card .card-kicker {
  color: #b7d0df;
}

.writing-panel {
  padding: 28px 32px 128px;
  background: var(--mustard);
  color: var(--card);
}

.writing-panel .section-label {
  margin-bottom: 26px;
}

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

.form-link {
  min-height: 82px;
  padding: 24px 22px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--card);
  color: var(--soft-blue);
  font-size: clamp(20px, 2.1vw, 26px);
  font-weight: 750;
  transition: transform .18s ease, box-shadow .18s ease;
}

.arrow {
  flex: 0 0 auto;
  font-size: 30px;
  line-height: 1;
}

.home-footer {
  min-height: 110px;
  padding: 25px 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  text-align: center;
  background: var(--footer);
  color: var(--soft-blue);
  font-size: 16px;
}

.mail-mark {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  background: var(--soft-blue);
  color: var(--footer);
  font-size: 13px;
  font-weight: 800;
}

.home-footer strong {
  color: #b8d0e0;
}

.about-main {
  padding-top: 100px;
}

.about-intro {
  min-height: 390px;
  padding: 0 4px;
}

.about-intro h1 {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(42px, 5vw, 58px);
}

.about-intro p {
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.3;
}

/* ---------- Category pages ---------- */

.category-page {
  --bg: #17172d;
  --header: #d8ac2d;
  --hero: #e5dac0;
  --text: #17172d;
  --muted: #6d506d;
  --footer-bg: #e5dac0;
  --footer-text: #17172d;
  --mobile-menu-text: #17172d;
  background: var(--bg);
  color: var(--header);
}

.category-page .site-header {
  border-color: color-mix(in srgb, var(--header) 65%, transparent);
}

.category-main {
  padding: 0 0 64px;
}

.category-hero {
  min-height: 295px;
  padding: 52px 46px;
  border-radius: 0 0 34px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 50px;
  background: var(--hero);
  color: var(--text);
}

.category-hero .eyebrow {
  color: var(--muted);
  margin-bottom: 25px;
}

.category-hero h1 {
  max-width: 700px;
  margin-bottom: 28px;
  font-size: clamp(46px, 5vw, 67px);
}

.category-hero .lead {
  margin-bottom: 0;
  font-size: 17px;
}

.stat-badge {
  width: 175px;
  min-height: 110px;
  padding: 17px 20px;
  justify-self: end;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--badge);
  color: var(--badge-text);
}

.stat-badge strong {
  font-size: 48px;
  line-height: 1;
  letter-spacing: -.04em;
}

.stat-badge span {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
}

.category-grid {
  padding: 52px 20px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.category-card {
  min-height: 305px;
  padding: 26px;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card-bg);
  color: var(--card-text);
  transition: transform .18s ease, box-shadow .18s ease;
}

.category-card .card-kicker {
  color: var(--card-kicker);
}

.category-card h2 {
  margin: 35px 0 auto;
  font-size: clamp(25px, 2.5vw, 33px);
  line-height: 1.02;
  letter-spacing: -.035em;
}

.category-card .arrow {
  color: var(--card-arrow);
}

.category-footer {
  min-height: 80px;
  padding: 25px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 16px;
  font-weight: 650;
}

.category-footer p {
  margin: 0;
}

.category-footer .back-link {
  color: var(--header);
  white-space: nowrap;
}

/* Creative */
.creative-theme {
  --bg: #17172d;
  --header: #d9ad2d;
  --hero: #e5dac0;
  --text: #17172d;
  --muted: #715170;
  --badge: #376552;
  --badge-text: #e9ddc3;
  --footer-bg: #e5dac0;
  --footer-text: #17172d;
}

.creative-theme .card-1 {
  --card-bg: #376552;
  --card-text: #e9ddc3;
  --card-kicker: #a9c8d2;
  --card-arrow: #e3b72a;
}

.creative-theme .card-2 {
  --card-bg: #683e66;
  --card-text: #eadfc2;
  --card-kicker: #b5a4c7;
  --card-arrow: #e3b72a;
}

.creative-theme .card-3 {
  --card-bg: #315a83;
  --card-text: #eee0c2;
  --card-kicker: #a9c6da;
  --card-arrow: #e3b72a;
}

/* Academic */
.academic-theme {
  --bg: #edd7c6;
  --header: #818a6d;
  --hero: #d4b982;
  --text: #cc704c;
  --muted: #7e8970;
  --badge: #e4d9c3;
  --badge-text: #cc704c;
  --footer-bg: #e4d9c3;
  --footer-text: #cc704c;
}

.academic-theme .category-hero {
  border-radius: 0 0 30px 30px;
}

.academic-theme .category-hero .lead {
  color: #7e8970;
}

.academic-theme .card-1 {
  --card-bg: #e4d9c3;
  --card-text: #cf744f;
  --card-kicker: #9dc8dc;
  --card-arrow: #cf744f;
}

.academic-theme .card-2 {
  --card-bg: #848d70;
  --card-text: #edd7c6;
  --card-kicker: #a9cee0;
  --card-arrow: #edd7c6;
}

.academic-theme .card-3 {
  --card-bg: #cb724c;
  --card-text: #edd7c6;
  --card-kicker: #a9cee0;
  --card-arrow: #edd7c6;
}

.academic-theme .category-footer .back-link {
  color: #808a6d;
}

/* Reviews */
.reviews-theme {
  --bg: #163f33;
  --header: #e6b42b;
  --hero: #679879;
  --text: #f0e6cd;
  --muted: #f0e6cd;
  --badge: #f0ead7;
  --badge-text: #163f33;
  --footer-bg: #f0ead7;
  --footer-text: #163f33;
}

.reviews-theme .category-hero .lead {
  color: #f0e6cd;
}

.reviews-theme .card-1 {
  --card-bg: #86b44d;
  --card-text: #163f33;
  --card-kicker: #a9cde0;
  --card-arrow: #163f33;
}

.reviews-theme .card-2 {
  --card-bg: #f7bf50;
  --card-text: #163f33;
  --card-kicker: #a9cde0;
  --card-arrow: #163f33;
}

.reviews-theme .card-3 {
  --card-bg: #5b8296;
  --card-text: #f3ebd7;
  --card-kicker: #a9cde0;
  --card-arrow: #f3ebd7;
}

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

@media (max-width: 850px) {
  .site-shell {
    padding-inline: 30px;
  }

  .home-main {
    padding-top: 32px;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr) 125px;
    gap: 30px;
  }

  .pebbles,
  .pebbles span {
    width: 124px;
  }

  .pebbles span {
    height: 66px;
  }

  .feature-grid,
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card {
    min-height: 150px;
  }

  .writing-panel {
    padding-bottom: 80px;
  }

  .category-hero {
    grid-template-columns: minmax(0, 1fr) 160px;
    padding: 44px 32px;
  }

  .category-grid {
    padding-inline: 12px;
  }

  .category-card {
    min-height: 215px;
  }

  .category-footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .site-shell {
    padding-inline: 14px;
  }

  .site-header {
    min-height: 50px;
    padding-inline: 3px;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  h1 {
    font-size: 39px;
  }

  .home-main {
    padding-top: 16px;
  }

  .home-hero {
    padding: 12px 3px 20px;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home-hero h1 {
    margin: 16px 0 18px;
    font-size: clamp(35px, 12vw, 48px);
  }

  .home-hero .lead {
    font-size: 16px;
  }

  .pebbles {
    width: 89px;
    justify-self: start;
    margin-top: 4px;
  }

  .pebbles span {
    width: 89px;
    height: 53px;
    margin-top: -5px;
  }

  .home-section {
    padding: 27px 3px 50px;
  }

  .feature-grid,
  .form-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 132px;
    border-radius: 25px;
  }

  .writing-panel {
    padding: 18px 14px 54px;
  }

  .form-link {
    min-height: 62px;
    padding: 17px 16px;
    font-size: 20px;
  }

  .home-footer {
    min-height: 140px;
    padding: 22px 13px;
    flex-wrap: wrap;
    line-height: 1.25;
  }

  .home-footer .mail-copy {
    width: 100%;
  }

  .about-main {
    padding-top: 70px;
  }

  .about-intro {
    min-height: 370px;
  }

  .about-intro p {
    font-size: 18px;
  }

  .category-main {
    padding-bottom: 0;
  }

  .category-hero {
    padding: 31px 27px 28px;
    grid-template-columns: 1fr;
    gap: 25px;
    border-radius: 0 0 30px 30px;
  }

  .category-hero h1 {
    margin-bottom: 25px;
    font-size: clamp(38px, 12vw, 53px);
  }

  .category-hero .lead {
    font-size: 16px;
  }

  .stat-badge {
    width: 100%;
    min-height: 92px;
    justify-self: stretch;
  }

  .category-grid {
    padding: 34px 4px 60px;
    gap: 13px;
  }

  .category-card {
    min-height: 173px;
    padding: 25px;
    border-radius: 29px;
  }

  .category-card h2 {
    margin-top: 28px;
    font-size: 25px;
  }

  .category-footer {
    min-height: 130px;
    padding: 26px 18px;
    line-height: 1.3;
  }
}


/* ---------- Legal links and legal pages ---------- */

.contact-line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 13px;
  font-weight: 700;
}

.legal-links a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.legal-links a:hover {
  opacity: .68;
}

.home-footer {
  flex-direction: column;
}

.category-footer-actions {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-direction: column;
}

.category-footer .legal-links {
  font-size: 12px;
}

.legal-theme {
  min-height: 100vh;
}

.legal-main {
  padding: 54px 0 70px;
}

.legal-card {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 62px);
  border-radius: 28px;
  background: #f1e6cf;
  color: #252238;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .14);
}

.legal-card .eyebrow {
  color: #776c3c;
  margin-bottom: 18px;
}

.legal-card h1 {
  margin-bottom: 42px;
  color: #08275d;
  font-size: clamp(42px, 6vw, 64px);
}

.legal-card h2 {
  margin: 38px 0 12px;
  color: #08275d;
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 1.15;
}

.legal-card p,
.legal-card address {
  margin: 0 0 17px;
  font-size: 16px;
  line-height: 1.58;
  font-style: normal;
}

.legal-card a {
  color: #08275d;
  text-decoration: underline;
  text-underline-offset: 3px;
}


.legal-page-footer {
  min-height: 98px;
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  background: #08265c;
  color: #aecbe0;
  font-weight: 700;
}

.legal-page-footer > a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 620px) {
  .contact-line {
    line-height: 1.3;
  }

  .category-footer-actions,
  .legal-page-footer {
    align-items: center;
  }

  .legal-main {
    padding: 25px 0 45px;
  }

  .legal-card {
    padding: 25px 18px 34px;
    border-radius: 20px;
  }

  .legal-card h1 {
    margin-bottom: 30px;
  }

  .legal-card p,
  .legal-card address {
    font-size: 15px;
  }

  .legal-page-footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}
