/*
Theme Name: Map The Place
Theme URI: https://maptheplace.com
Author: OpenAI Codex
Author URI: https://openai.com
Description: A bold editorial WordPress theme for story-driven destination planning, designed as the sister site to To The Place.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: maptheplace
*/

:root {
  --bg: #f4efe6;
  --bg-soft: #fbf7f1;
  --panel: rgba(255, 251, 245, 0.88);
  --panel-strong: rgba(255, 248, 240, 0.96);
  --text: #231b18;
  --muted: #6d5b52;
  --line: rgba(78, 58, 48, 0.12);
  --accent: #c85d3b;
  --accent-strong: #8e3428;
  --gold: #b58a3b;
  --shadow: 0 18px 50px rgba(75, 50, 34, 0.12);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --content-width: min(1180px, calc(100vw - 2rem));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(181, 138, 59, 0.16), transparent 30%),
    radial-gradient(circle at 85% 18%, rgba(200, 93, 59, 0.1), transparent 22%),
    linear-gradient(180deg, #f8f3eb 0%, #f4efe6 42%, #efe7dc 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(86, 64, 50, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 64, 50, 0.03) 1px, transparent 1px);
  background-size: 88px 88px;
  content: "";
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent 85%);
}

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

a:hover,
a:focus-visible {
  color: var(--gold);
}

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

.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;
}

.page-shell {
  width: var(--content-width);
  margin: 0 auto;
  padding-bottom: 2.5rem;
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem auto 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(252, 247, 241, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #d57c52, #f1c98b);
  color: #fff8f1;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.site-nav .menu {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav .menu-item-has-children {
  position: relative;
}

.site-nav .sub-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  min-width: 15rem;
  margin: 0;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: rgba(255, 249, 242, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease;
  list-style: none;
}

.site-nav .sub-menu .sub-menu {
  top: -0.8rem;
  left: calc(100% + 0.7rem);
}

.site-nav .menu-item-has-children:hover > .sub-menu,
.site-nav .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav .sub-menu a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.7rem;
  color: #3b2c26;
  font-size: 0.92rem;
}

.site-nav .sub-menu a:hover,
.site-nav .sub-menu a:focus-visible {
  background: rgba(181, 138, 59, 0.1);
  color: var(--accent-strong);
}

.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1rem;
  height: 2px;
  margin: 0.28rem auto;
  background: var(--text);
}

.hero,
.spotlight-strip,
.destinations,
.why-section,
.stories-section,
.newsletter-section,
.content-shell {
  opacity: 0;
  transform: translateY(24px);
  animation: fade-up 0.8s ease forwards;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.35rem;
  align-items: center;
  min-height: auto;
  padding: 1.5rem 0 1rem;
  animation-delay: 0.08s;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.newsletter-panel h2,
.spotlight-strip h2,
.entry-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(4rem, 9vw, 7.6rem);
}

.hero h1 span {
  color: var(--accent-strong);
}

.hero-text,
.entry-content,
.archive-intro {
  max-width: 42rem;
  margin: 0.95rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.35rem;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0 1.35rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.button:hover,
.button:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible,
button:hover,
button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
  transform: translateY(-2px);
}

.button-primary,
.wp-block-button__link,
button,
input[type="submit"] {
  background: linear-gradient(135deg, #d67f58, #a44631);
  color: #fff9f3;
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

.hero-stats li {
  padding: 0.85rem 0.9rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.62);
}

.hero-stats strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 1rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.hero-visual {
  position: relative;
  min-height: 30rem;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
}

.orb-gold {
  top: 3%;
  left: 6%;
  width: 11rem;
  height: 11rem;
  background: radial-gradient(circle, rgba(213, 155, 88, 0.46), transparent 70%);
}

.orb-red {
  right: 8%;
  bottom: 8%;
  width: 12rem;
  height: 12rem;
  background: radial-gradient(circle, rgba(171, 73, 57, 0.28), transparent 70%);
}

.map-card {
  position: absolute;
  inset: 2rem 0 0 2rem;
  overflow: hidden;
  border: 1px solid rgba(101, 74, 56, 0.12);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.65), transparent 30%),
    linear-gradient(180deg, rgba(255, 249, 240, 0.98), rgba(243, 235, 224, 0.96));
  box-shadow: var(--shadow);
}

.map-card::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(138, 106, 83, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 106, 83, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  content: "";
}

.map-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: 1.1rem 1.2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.map-grid {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 26%, rgba(255, 174, 80, 0.14), transparent 14%),
    radial-gradient(circle at 72% 38%, rgba(255, 174, 80, 0.12), transparent 13%),
    radial-gradient(circle at 58% 74%, rgba(255, 174, 80, 0.12), transparent 14%);
}

.route {
  position: absolute;
  border: 2px dashed rgba(181, 138, 59, 0.78);
  border-radius: 999px;
}

.route-one {
  top: 24%;
  left: 20%;
  width: 52%;
  height: 26%;
  border-right: none;
  border-bottom: none;
  transform: rotate(-6deg);
}

.route-two {
  right: 12%;
  bottom: 20%;
  width: 38%;
  height: 24%;
  border-left: none;
  border-top: none;
  transform: rotate(12deg);
}

.pin {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text);
  font-size: 0.84rem;
}

.pin span {
  display: block;
  width: 1rem;
  height: 1rem;
  border: 3px solid rgba(255, 250, 243, 0.98);
  border-radius: 50%;
  background: linear-gradient(135deg, #d67f58, #a44631);
  box-shadow: 0 0 0 12px rgba(181, 138, 59, 0.1);
}

.pin small {
  color: var(--muted);
  font-size: 0.78rem;
}

.pin-one {
  top: 28%;
  left: 18%;
}

.pin-two {
  top: 42%;
  right: 18%;
}

.pin-three {
  bottom: 18%;
  left: 38%;
}

.spotlight-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.4rem;
  animation-delay: 0.18s;
}

.spotlight-strip article,
.destination-card,
.why-panel,
.why-list article,
.story-card,
.newsletter-panel,
.content-shell,
.archive-card,
.featured-post-card,
.compact-post-card,
.category-pill {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.spotlight-strip article {
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-md);
}

.spotlight-strip p {
  margin: 0 0 0.8rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.spotlight-strip h2 {
  font-size: clamp(2rem, 3.4vw, 3rem);
}

.destinations,
.why-section,
.stories-section,
.newsletter-section,
.content-shell,
.archive-shell {
  margin-top: 3.25rem;
}

.destinations {
  animation-delay: 0.28s;
}

.why-section {
  animation-delay: 0.38s;
}

.stories-section {
  animation-delay: 0.48s;
}

.newsletter-section,
.content-shell {
  animation-delay: 0.58s;
}

.section-heading {
  display: grid;
  gap: 0.8rem;
  max-width: 46rem;
  margin-bottom: 1.15rem;
}

.section-heading h2,
.newsletter-panel h2,
.entry-title {
  font-size: clamp(2.6rem, 5vw, 4.7rem);
}

.destination-grid,
.story-grid,
.archive-grid,
.compact-post-grid,
.category-pill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.destination-card,
.story-card,
.archive-card,
.featured-post-card,
.compact-post-card {
  position: relative;
  min-height: 15.5rem;
  padding: 1.2rem;
  border-radius: var(--radius-md);
}

.destination-card::before,
.story-card::before,
.archive-card::before,
.featured-post-card::before,
.compact-post-card::before {
  position: absolute;
  inset: auto 1.5rem 1.2rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 228, 193, 0), rgba(255, 228, 193, 0.38), rgba(255, 228, 193, 0));
  content: "";
}

.post-showcase {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.85rem;
}

.compact-post-grid {
  grid-template-columns: 1fr;
}

.featured-post-card {
  min-height: 21rem;
  background:
    radial-gradient(circle at top right, rgba(213, 155, 88, 0.18), transparent 25%),
    linear-gradient(180deg, rgba(255, 248, 240, 0.97), rgba(242, 233, 223, 0.96));
}

.compact-post-card {
  min-height: 0;
}

.destination-card-featured {
  grid-column: span 2;
  background:
    radial-gradient(circle at top right, rgba(213, 155, 88, 0.18), transparent 25%),
    linear-gradient(180deg, rgba(255, 248, 240, 0.97), rgba(242, 233, 223, 0.96));
}

.destination-tag,
.story-kicker {
  margin: 0 0 0.9rem;
  color: var(--accent-strong);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.destination-card h3,
.story-card h3,
.why-panel h3,
.archive-card h2,
.featured-post-card h3,
.compact-post-card h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1;
}

.destination-card p,
.story-card p,
.why-panel p,
.why-list p,
.archive-card p,
.featured-post-card p,
.compact-post-card p,
.entry-content p,
.entry-content li {
  color: var(--muted);
  line-height: 1.7;
}

.destination-card a,
.archive-card a,
.featured-post-card a,
.compact-post-card a {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--text);
  font-weight: 700;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-card-footer a {
  margin-top: 0;
  color: var(--accent-strong);
}

.category-pill-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-pill {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
}

.category-pill span {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  line-height: 1;
}

.category-pill small {
  color: var(--muted);
  font-size: 0.88rem;
}

.why-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0.85rem;
}

.why-panel {
  padding: 1.45rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top left, rgba(200, 93, 59, 0.12), transparent 28%),
    var(--panel-strong);
}

.why-list {
  display: grid;
  gap: 0.85rem;
}

.why-list article {
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-md);
}

.why-list strong {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}

.newsletter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  align-items: end;
  padding: 1.45rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(213, 155, 88, 0.15), transparent 24%),
    linear-gradient(180deg, rgba(255, 248, 240, 0.98), rgba(243, 235, 224, 0.96));
}

.newsletter-form {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.newsletter-form input,
input[type="text"],
input[type="email"],
textarea {
  width: min(24rem, 48vw);
  min-height: 3.5rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
}

textarea {
  width: 100%;
  min-height: 10rem;
  padding: 1rem;
  border-radius: 1.4rem;
}

input::placeholder,
textarea::placeholder {
  color: #e1d2c3;
}

.content-shell {
  padding: 1.45rem;
  border-radius: var(--radius-lg);
}

.content-shell .entry-title {
  max-width: 16ch;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--text);
  font-family: "Cormorant Garamond", serif;
}

.entry-content h2 {
  font-size: 2.25rem;
}

.entry-content h3 {
  font-size: 1.75rem;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.25rem;
}

.entry-content blockquote {
  margin: 2rem 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
}

.archive-shell {
  display: grid;
  gap: 1.15rem;
}

.archive-card h2 a {
  color: var(--text);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.4rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .hero,
  .why-layout,
  .newsletter-panel,
  .post-showcase {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 1.15rem;
  }

  .hero h1 {
    max-width: 12ch;
  }

  .hero-visual {
    min-height: 24rem;
  }

  .destination-grid,
  .story-grid,
  .archive-grid,
  .category-pill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .newsletter-form {
    flex-wrap: wrap;
  }

  .newsletter-form input {
    width: min(100%, 28rem);
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 1rem, 100%);
  }

  .site-header {
    flex-wrap: wrap;
    border-radius: 1.5rem;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-header.nav-open .site-nav {
    display: block;
  }

  .site-nav .menu {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.5rem;
  }

  .site-nav .sub-menu {
    position: static;
    min-width: 100%;
    margin-top: 0.35rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: none;
  }

  .hero-stats,
  .spotlight-strip,
  .destination-grid,
  .story-grid,
  .archive-grid,
  .category-pill-grid {
    grid-template-columns: 1fr;
  }

  .destination-card-featured {
    grid-column: span 1;
  }

  .hero {
    gap: 1.5rem;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 16vw, 5rem);
  }

  .hero-text,
  .destination-card p,
  .story-card p,
  .why-panel p,
  .why-list p,
  .entry-content,
  .archive-intro {
    font-size: 1rem;
  }

  .hero-visual {
    min-height: 19rem;
  }

  .map-card {
    inset: 1rem 0 0;
  }

  .newsletter-panel,
  .content-shell {
    padding: 1.4rem;
  }

  .newsletter-form,
  .newsletter-form input,
  .newsletter-form button,
  input[type="text"],
  input[type="email"] {
    width: 100%;
  }

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