/*
Theme Name: Coastal Ledger
Author: Mara Vale Studio
Description: A classic PHP WordPress travel journal theme with a coastal editorial layout, dynamic category archives, and built-in visual fallbacks.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: wtwb-theme
*/

:root {
  --wtwb-bg: #fdfbf7;
  --wtwb-surface: #ffffff;
  --wtwb-ink: #0b3f64;
  --wtwb-ink-soft: #394145;
  --wtwb-teal: #136087;
  --wtwb-sand: #c9a165;
  --wtwb-line: #dbdad9;
  --wtwb-lime: #dfeeb7;
  --wtwb-lime-strong: #cfe27b;
  --wtwb-shadow: 0 24px 80px rgba(17, 20, 23, 0.12);
  --wtwb-radius: 20px;
  --wtwb-serif: Georgia, "Times New Roman", serif;
  --wtwb-sans: Inter, "DM Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--wtwb-bg);
  color: var(--wtwb-ink-soft);
  font-family: var(--wtwb-sans);
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--wtwb-teal);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

.wtwb-screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wtwb-screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  color: var(--wtwb-ink);
  background: var(--wtwb-surface);
  border: 1px solid var(--wtwb-line);
  border-radius: 999px;
}

.wtwb-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.wtwb-site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(253, 251, 247, 0.9);
  border-bottom: 1px solid rgba(11, 63, 100, 0.12);
  backdrop-filter: blur(16px);
}

.wtwb-header-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 22px;
  min-height: 78px;
}

.wtwb-brand {
  min-width: 0;
}

.wtwb-brand a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--wtwb-ink);
  font-family: var(--wtwb-serif);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1;
  text-decoration: none;
}

.wtwb-custom-logo {
  width: auto;
  max-width: min(260px, 64vw);
  max-height: 52px;
}

.wtwb-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--wtwb-bg);
  background: var(--wtwb-ink);
  border-radius: 999px;
  font-family: var(--wtwb-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}

.wtwb-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--wtwb-ink);
  background: var(--wtwb-surface);
  border: 1px solid rgba(11, 63, 100, 0.2);
  border-radius: 999px;
  cursor: pointer;
}

.wtwb-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.wtwb-primary-nav {
  display: flex;
  justify-content: center;
}

.wtwb-primary-nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.wtwb-menu-item {
  position: relative;
}

.wtwb-primary-nav .wtwb-sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  min-width: 190px;
  padding: 10px;
  margin-top: 6px;
  background: var(--wtwb-surface);
  border: 1px solid rgba(11, 63, 100, 0.14);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(17, 20, 23, 0.12);
}

.wtwb-menu-item:hover > .wtwb-sub-menu,
.wtwb-menu-item:focus-within > .wtwb-sub-menu {
  display: grid;
}

.wtwb-primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  color: var(--wtwb-ink);
  border-radius: 999px;
  text-decoration: none;
}

.wtwb-primary-nav a:hover,
.wtwb-primary-nav a:focus,
.wtwb-primary-nav .wtwb-menu-current > a {
  background: rgba(201, 161, 101, 0.16);
}

.wtwb-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  color: var(--wtwb-ink);
  background: var(--wtwb-surface);
  border: 1px solid rgba(11, 63, 100, 0.25);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

.wtwb-main {
  min-height: 70vh;
}

.wtwb-hero {
  padding: clamp(48px, 7vw, 92px) 0 34px;
}

.wtwb-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
}

.wtwb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  color: var(--wtwb-teal);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wtwb-kicker::before {
  content: "";
  width: 38px;
  height: 1px;
  background: var(--wtwb-sand);
}

.wtwb-hero-title {
  max-width: 650px;
  margin: 0;
  color: var(--wtwb-ink);
  font-family: var(--wtwb-serif);
  font-size: clamp(3rem, 7.4vw, 6.8rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: 0;
}

.wtwb-hero-text {
  max-width: 540px;
  margin: 24px 0 0;
  color: var(--wtwb-ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.wtwb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.wtwb-button,
.wtwb-button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.wtwb-button {
  color: var(--wtwb-bg);
  background: var(--wtwb-ink);
  box-shadow: 0 14px 28px rgba(11, 63, 100, 0.18);
}

.wtwb-button:hover,
.wtwb-button:focus {
  color: var(--wtwb-bg);
  background: var(--wtwb-teal);
  transform: translateY(-1px);
}

.wtwb-button-outline {
  color: var(--wtwb-ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(11, 63, 100, 0.2);
}

.wtwb-media-panel {
  position: relative;
  min-height: 460px;
}

.wtwb-hero-image {
  width: 100%;
  aspect-ratio: 1.18;
  object-fit: cover;
  border-radius: var(--wtwb-radius);
  box-shadow: var(--wtwb-shadow);
}

.wtwb-float-note {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: min(260px, 70%);
  padding: 18px;
  color: var(--wtwb-ink);
  background: rgba(253, 251, 247, 0.88);
  border: 1px solid rgba(253, 251, 247, 0.85);
  border-radius: var(--wtwb-radius);
  box-shadow: 0 18px 44px rgba(17, 20, 23, 0.16);
  backdrop-filter: blur(14px);
}

.wtwb-float-note strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--wtwb-serif);
  font-size: 1.35rem;
  font-weight: 400;
}

.wtwb-mosaic {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.9fr;
  gap: 18px;
  margin: 28px 0 clamp(42px, 7vw, 86px);
}

.wtwb-mosaic img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--wtwb-radius);
}

.wtwb-mosaic img:nth-child(1) {
  aspect-ratio: 1.65;
}

.wtwb-mosaic img:nth-child(2) {
  aspect-ratio: 0.78;
}

.wtwb-mosaic img:nth-child(3) {
  aspect-ratio: 1.04;
  align-self: end;
}

.wtwb-section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.45fr);
  align-items: end;
  gap: 26px;
  margin-bottom: 26px;
}

.wtwb-section-title,
.wtwb-page-title {
  margin: 0;
  color: var(--wtwb-ink);
  font-family: var(--wtwb-serif);
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.wtwb-section-copy {
  margin: 0;
  color: var(--wtwb-ink-soft);
}

.wtwb-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 34px;
}

.wtwb-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 13px;
  color: var(--wtwb-ink);
  background: var(--wtwb-surface);
  border: 1px solid rgba(11, 63, 100, 0.16);
  border-radius: 999px;
  font-size: 0.88rem;
  text-decoration: none;
}

.wtwb-chip:hover,
.wtwb-chip:focus {
  background: rgba(201, 161, 101, 0.18);
}

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

.wtwb-post-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  color: var(--wtwb-ink-soft);
  background: var(--wtwb-surface);
  border: 1px solid rgba(11, 63, 100, 0.12);
  border-radius: var(--wtwb-radius);
}

.wtwb-post-card a {
  text-decoration: none;
}

.wtwb-card-image {
  position: relative;
  overflow: hidden;
  background: #eef3eb;
}

.wtwb-card-image img {
  width: 100%;
  aspect-ratio: 1.18;
  object-fit: cover;
  transition: transform 420ms ease;
}

.wtwb-post-card:hover .wtwb-card-image img {
  transform: scale(1.035);
}

.wtwb-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.wtwb-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: rgba(57, 65, 69, 0.82);
  font-size: 0.82rem;
}

.wtwb-card-title {
  margin: 0;
  color: var(--wtwb-ink);
  font-family: var(--wtwb-serif);
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  font-weight: 400;
  line-height: 1.12;
}

.wtwb-card-title a:hover,
.wtwb-card-title a:focus {
  color: var(--wtwb-teal);
}

.wtwb-card-excerpt {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.wtwb-feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
  gap: 18px;
  margin: clamp(34px, 6vw, 72px) 0;
}

.wtwb-lime-card,
.wtwb-mini-stack {
  border-radius: var(--wtwb-radius);
}

.wtwb-lime-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.75fr);
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
  color: var(--wtwb-ink);
  background: linear-gradient(135deg, var(--wtwb-lime) 0%, #eef7cf 100%);
  border: 1px solid rgba(11, 63, 100, 0.1);
}

.wtwb-lime-card h2 {
  max-width: 680px;
  margin: 0;
  font-family: var(--wtwb-serif);
  font-size: clamp(2rem, 4.2vw, 4rem);
  font-weight: 400;
  line-height: 1;
}

.wtwb-lime-card p {
  margin: 18px 0 0;
  max-width: 560px;
}

.wtwb-lime-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
}

.wtwb-mini-stack {
  display: grid;
  gap: 18px;
}

.wtwb-mini-card {
  padding: 22px;
  color: var(--wtwb-ink);
  background: var(--wtwb-surface);
  border: 1px solid rgba(11, 63, 100, 0.12);
  border-radius: var(--wtwb-radius);
}

.wtwb-mini-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--wtwb-sand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wtwb-mini-card p {
  margin: 0;
  font-family: var(--wtwb-serif);
  font-size: 1.5rem;
  line-height: 1.15;
}

.wtwb-page-hero {
  padding: clamp(46px, 7vw, 86px) 0 28px;
  border-bottom: 1px solid rgba(11, 63, 100, 0.12);
}

.wtwb-page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
}

.wtwb-archive-grid {
  padding: clamp(34px, 6vw, 72px) 0;
}

.wtwb-single-wrap {
  width: min(80vw, 960px);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 92px) 0;
}

.wtwb-single-header {
  margin-bottom: 34px;
}

.wtwb-single-title {
  margin: 0;
  color: var(--wtwb-ink);
  font-family: var(--wtwb-serif);
  font-size: clamp(2.6rem, 6vw, 6.3rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0;
}

.wtwb-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  color: rgba(57, 65, 69, 0.82);
}

.wtwb-content {
  color: var(--wtwb-ink-soft);
  font-size: clamp(1rem, 1.2vw, 1.08rem);
}

.wtwb-content > * {
  max-width: 100%;
}

.wtwb-content h1,
.wtwb-content h2,
.wtwb-content h3,
.wtwb-content h4 {
  color: var(--wtwb-ink);
  font-family: var(--wtwb-serif);
  font-weight: 400;
  line-height: 1.12;
}

.wtwb-content h2 {
  margin-top: 1.7em;
  font-size: clamp(2rem, 3vw, 3.1rem);
}

.wtwb-content a {
  color: var(--wtwb-teal);
}

.wtwb-content blockquote {
  margin: 32px 0;
  padding: 24px;
  color: var(--wtwb-ink);
  background: rgba(201, 161, 101, 0.14);
  border-left: 4px solid var(--wtwb-sand);
  border-radius: 16px;
}

.wtwb-content img {
  border-radius: var(--wtwb-radius);
}

.wtwb-post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 48px;
}

.wtwb-post-nav a {
  display: block;
  min-height: 74px;
  padding: 18px;
  color: var(--wtwb-ink);
  background: var(--wtwb-surface);
  border: 1px solid rgba(11, 63, 100, 0.12);
  border-radius: var(--wtwb-radius);
  text-decoration: none;
}

.wtwb-empty {
  padding: 34px;
  color: var(--wtwb-ink);
  background: var(--wtwb-surface);
  border: 1px solid rgba(11, 63, 100, 0.12);
  border-radius: var(--wtwb-radius);
}

.wtwb-pagination {
  margin-top: 34px;
}

.wtwb-pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wtwb-pagination a,
.wtwb-pagination span {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: var(--wtwb-surface);
  border: 1px solid rgba(11, 63, 100, 0.14);
  border-radius: 999px;
  text-decoration: none;
}

.wtwb-pagination-current {
  color: var(--wtwb-bg);
  background: var(--wtwb-ink);
}

.wtwb-site-footer {
  padding: 44px 0;
  color: var(--wtwb-ink);
  border-top: 1px solid rgba(11, 63, 100, 0.16);
}

.wtwb-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.wtwb-footer-menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.wtwb-footer-menu a {
  text-decoration: none;
}

@media (max-width: 1080px) {
  .wtwb-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wtwb-hero-grid,
  .wtwb-section-head,
  .wtwb-feature-row {
    grid-template-columns: 1fr;
  }

  .wtwb-media-panel {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .wtwb-shell {
    width: min(100% - 24px, 680px);
  }

  .wtwb-header-inner {
    grid-template-columns: 1fr auto;
    min-height: 68px;
  }

  .wtwb-menu-toggle {
    display: inline-block;
  }

  .wtwb-header-action {
    display: none;
  }

  .wtwb-primary-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 12px;
    right: 12px;
    display: none;
    padding: 12px;
    background: rgba(253, 251, 247, 0.98);
    border: 1px solid rgba(11, 63, 100, 0.14);
    border-radius: 20px;
    box-shadow: 0 22px 46px rgba(17, 20, 23, 0.12);
  }

  .wtwb-primary-nav.wtwb-is-open {
    display: block;
  }

  .wtwb-primary-nav ul {
    display: grid;
    gap: 6px;
  }

  .wtwb-primary-nav .wtwb-sub-menu {
    position: static;
    display: grid;
    min-width: 0;
    margin: 4px 0 0 14px;
    padding: 6px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .wtwb-primary-nav a {
    width: 100%;
    justify-content: space-between;
  }

  .wtwb-hero {
    padding-top: 36px;
  }

  .wtwb-hero-title {
    font-size: clamp(3rem, 15vw, 5.2rem);
  }

  .wtwb-float-note {
    position: static;
    width: 100%;
    margin-top: 14px;
  }

  .wtwb-mosaic {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .wtwb-mosaic img:nth-child(1) {
    grid-column: 1 / -1;
  }

  .wtwb-post-grid,
  .wtwb-lime-card,
  .wtwb-post-nav {
    grid-template-columns: 1fr;
  }

  .wtwb-single-wrap {
    width: min(80vw, 680px);
  }
}

@media (max-width: 460px) {
  body {
    font-size: 15px;
  }

  .wtwb-brand a {
    font-size: 1.12rem;
  }

  .wtwb-brand-mark {
    width: 34px;
    height: 34px;
  }

  .wtwb-actions {
    display: grid;
  }

  .wtwb-button,
  .wtwb-button-outline {
    width: 100%;
  }

  .wtwb-single-wrap {
    width: 80vw;
  }
}
