/* ==========================================================================
   Bastion — quiet retreat site template
   Tokens derived from the reference study (source-derived / runtime-derived):
   paper #F8EDE2 · ink #344A32 · sage #ABC5A9 · peach #ECCFB2 · light #E3ECE2
   display 32.04px / 1.2 · body 18px / 1.4 · 6-column grid, 25.2px gap
   container 1488px with 18px padding · dashed 1px pill buttons (radius 1200px)
   ========================================================================== */

:root {
  --ink: #344a32;
  --paper: #f8ede2;
  --paper-light: #fcf4ec;
  --sage: #abc5a9;
  --peach: #eccfb2;
  --brown: #2e2a22;
  --light: #e3ece2;
  --muted-light: #4e624b;
  --muted-dark: #a2baa0;
  --hairline: rgba(52, 74, 50, 0.42);
  --hairline-dark: rgba(227, 236, 226, 0.34);
  --tint: rgba(52, 74, 50, 0.09);
  --tint-dark: rgba(227, 236, 226, 0.14);
  --radius-img: 12px;
  --radius-field: 8px;
  --gap: 25.2px;
  --container: 1488px;
  --display: 32px;
  --small: 16px;
  --font: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

[hidden] {
  display: none !important;
}

.form-status {
  min-height: 22px;
  color: var(--ink);
}

.form-status.is-error {
  color: #9a3b24;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #9a3b24;
}

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

  .social-grid.grid > * {
    grid-column: span 1 !important;
  }

  .social-btn {
    min-height: 48px;
  }
}

.hero-main.hero-main--top {
  align-items: start;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding-left: 0;
}

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

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- type ---------- */

.display,
h1,
h2,
h3 {
  font-size: var(--display);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.004em;
}

h4 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 500;
}

.small {
  font-size: var(--small);
  line-height: 1.45;
}

.muted {
  color: var(--muted-light);
}

.on-dark .muted {
  color: var(--muted-dark);
}

/* ---------- surfaces ---------- */

.surface--paper {
  background: var(--paper);
}

.surface--peach {
  background: var(--peach);
}

.surface--sage {
  background: var(--sage);
}

.surface--ink {
  background: var(--ink);
  color: var(--light);
}

.surface--brown {
  background: var(--brown);
  color: var(--light);
}

.on-dark {
  color: var(--light);
}

/* ---------- structure ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 18px;
}

.section {
  padding: 25.2px 0 72px;
}

.section--no-top {
  padding-top: 0;
}

.section--tight {
  padding-bottom: 25.2px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: var(--gap);
  align-items: start;
}

.grid + .grid {
  margin-top: 50px;
}

.rows {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.rows--tight {
  gap: 12px;
}

.dotted {
  border: 0;
  border-top: 1px dashed var(--hairline);
  margin: 0;
  width: 100%;
}

/* ---------- media ---------- */

.ph {
  width: 100%;
  border-radius: var(--radius-img);
  object-fit: cover;
  background: rgba(52, 74, 50, 0.12);
}

.ph--landscape {
  aspect-ratio: 2 / 1;
}

.ph--wide {
  aspect-ratio: 16 / 9;
}

.ph--square {
  aspect-ratio: 1 / 1;
}

.ph--portrait {
  aspect-ratio: 3 / 4;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 45px;
  padding: 9px 60px;
  border: 1px dashed currentColor;
  border-radius: 1200px;
  background: transparent;
  color: inherit;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  background: var(--tint);
}

.on-dark .btn {
  border-color: var(--muted-dark);
}

.on-dark .btn:hover {
  background: var(--tint-dark);
}

.text-link {
  position: relative;
  display: inline-block;
  font-weight: 500;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.text-link:hover::after,
.text-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ---------- site header ---------- */

.site-header {
  position: relative;
  padding: 24px 0 18px;
}

.brand {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.wordmark {
  display: inline-block;
  font-size: 70px;
  line-height: 0.86;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.header-nav {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
}

.nav-links {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 18px;
  font-weight: 500;
}

.header-cta {
  align-self: flex-end;
}

.nav-toggle {
  display: none;
  position: absolute;
  top: 26px;
  right: 18px;
  width: 46px;
  height: 46px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px dashed var(--hairline);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- hero rows ---------- */

.hero-main {
  grid-column: span 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: var(--gap);
  align-items: end;
}

.hero-main .hero-img {
  grid-column: span 3;
}

.hero-main .hero-copy {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.hero-thumb {
  grid-column: span 1;
}

.hero-thumb img {
  width: 100%;
}

/* ---------- feature bands (home) ---------- */

.band-inner {
  grid-column: span 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: var(--gap);
  align-items: center;
}

.band-copy {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.band-media {
  grid-column: span 3;
}

.band-thumb {
  grid-column: span 1;
}

.band-thumb img {
  width: 100%;
}

.band--thumb-first .band-thumb {
  order: -1;
}

/* ---------- icon features ---------- */

.feature-list {
  grid-column: span 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 42px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 18px;
  font-weight: 500;
}

.icon-tile {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--paper-light);
  color: var(--ink);
}

.on-dark .icon-tile {
  background: rgba(227, 236, 226, 0.14);
  color: var(--light);
}

.icon-tile svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.head-copy {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- gallery slider ---------- */

.slider {
  position: relative;
}

.slide-mask {
  overflow: hidden;
}

.slide-img {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: 100%;
  max-height: 540px;
  border-radius: var(--radius-img);
}

.slider-arrows {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.slider-arrows .circle-btn {
  pointer-events: auto;
}

.circle-btn {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.circle-btn:hover {
  background: var(--ink);
  color: var(--light);
}

.circle-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- inclusions ---------- */

.inclusion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.inclusion-list li {
  font-size: var(--display);
  line-height: 1.25;
}

.body-copy {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}

/* ---------- activities marquee ---------- */

.activities-side {
  grid-column: span 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
}

.marquee {
  position: relative;
  overflow: hidden;
  padding: 10px 0;
}

.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 46s linear infinite;
}

.marquee-group {
  display: flex;
  gap: 56px;
  padding-right: 56px;
}

.marquee-track span {
  font-size: var(--display);
  line-height: 1.3;
  white-space: nowrap;
  color: var(--muted-dark);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 90px;
  z-index: 1;
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--brown), transparent);
}

.marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--brown), transparent);
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

/* ---------- locale list ---------- */

.locale-block {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.locale-thumb {
  grid-column: span 1;
}

.locale-thumb img {
  aspect-ratio: 1 / 1;
}

.locale-list {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.locale-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 10px;
  align-items: start;
}

.locale-item h4 {
  margin-bottom: 10px;
}

.locale-item a {
  color: var(--muted-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.locale-item a:hover {
  color: var(--ink);
}

/* ---------- reviews ---------- */

.quote-slider {
  grid-column: span 5;
  position: relative;
}

.quote-slide {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 260px;
  padding-bottom: 60px;
}

.stars {
  display: flex;
  gap: 6px;
  color: var(--ink);
}

.stars svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.quote-nav {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  gap: 14px;
}

.review-thumb {
  grid-column: span 1;
}

.review-thumb img {
  aspect-ratio: 1 / 1;
}

.review-cta {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
}

/* ---------- journal ---------- */

.journal-item {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: var(--gap);
  align-items: start;
}

.journal-thumb {
  grid-column: 1 / span 1;
}

.journal-thumb img {
  aspect-ratio: 1 / 1;
}

.journal-copy {
  grid-column: 4 / span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.journal-list {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.journal-deco {
  grid-column: span 1;
  align-self: center;
}

.journal-deco img {
  aspect-ratio: 3 / 4;
}

/* ---------- article ---------- */

.article-wrap {
  grid-column: 3 / span 3;
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: flex-start;
}

.article {
  font-size: 18px;
  line-height: 1.6;
}

.article h4 {
  font-size: 20px;
  font-weight: 500;
  margin: 30px 0 14px;
}

.article > :first-child {
  margin-top: 0;
}

.article p {
  margin: 0 0 20px;
}

.article ul,
.article ol {
  margin: 0 0 20px;
  padding-left: 1.4em;
}

.article li {
  margin-bottom: 10px;
}

.share {
  display: flex;
  align-items: baseline;
  gap: 26px;
  flex-wrap: wrap;
}

.share-links {
  display: flex;
  gap: 24px;
}

.share-links a {
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* ---------- contact ---------- */

.contact-copy {
  grid-column: 3 / span 4;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.contact-group h1,
.contact-group h2 {
  color: var(--muted-light);
  margin-bottom: 10px;
}

.contact-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.contact-lines a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.field input,
.field textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(52, 74, 50, 0.24);
  border-radius: var(--radius-field);
  background: rgba(255, 255, 255, 0.34);
  color: inherit;
  font-size: 17px;
  line-height: 1.4;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field textarea {
  min-height: 148px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(52, 74, 50, 0.52);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  outline: none;
}

.form-actions {
  margin-top: 6px;
}

/* ---------- social band ---------- */

.social-grid > .ph {
  grid-column: span 1;
}

.social-pair {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px dashed currentColor;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 500;
  transition: background-color 0.25s ease;
}

.social-btn:hover {
  background: var(--tint);
}

.on-dark .social-btn:hover {
  background: var(--tint-dark);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--light);
  padding: 25.2px 0 34px;
}

.footer-brand {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.footer-brand .wordmark {
  color: var(--light);
}

.footer-body {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 18px;
  font-weight: 500;
}

.footer-cta {
  align-self: flex-start;
}

.footer-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 18px;
}

.footer-info h4 {
  margin-bottom: 8px;
}

.footer-info p,
.footer-info a {
  color: var(--muted-dark);
  font-size: 18px;
  line-height: 1.5;
}

.footer-info a:hover {
  color: var(--light);
}

.footer-bottom {
  margin-top: 58px;
  padding-top: 18px;
  border-top: 1px dashed var(--hairline-dark);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted-dark);
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--light);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- motion ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal,
  html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    gap: 24px 32px;
  }

  .btn,
  .social-btn,
  .circle-btn,
  .text-link::after,
  .to-top {
    transition: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1200px) {
  :root {
    --display: 29px;
  }

  .wordmark {
    font-size: 58px;
  }
}

@media (max-width: 991px) {
  .grid,
  .hero-main,
  .band-inner,
  .journal-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid > *,
  .hero-main > *,
  .band-inner > *,
  .journal-item > * {
    grid-column: 1 / -1 !important;
  }

  .band--thumb-first .band-thumb,
  .band-thumb {
    order: 0;
  }

  .feature-list,
  .locale-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand,
  .header-nav {
    grid-column: 1 / -1;
  }

  .brand {
    gap: 14px;
  }

  .wordmark {
    font-size: 46px;
  }

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

  .header-nav {
    display: none;
  }

  .header-nav.is-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    gap: 14px;
  }

  .header-cta {
    align-self: stretch;
  }

  .band-thumb img,
  .hero-thumb img,
  .journal-deco img,
  .locale-thumb img,
  .review-thumb img {
    max-width: 220px;
  }

  .quote-slide {
    min-height: 0;
    padding-bottom: 72px;
  }

  .slide-img {
    max-height: 380px;
  }

  .footer-info {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --display: 25px;
    --gap: 18px;
  }

  body {
    font-size: 17px;
  }

  .section {
    padding: 20px 0 52px;
  }

  .grid + .grid {
    margin-top: 34px;
  }

  .wordmark {
    font-size: 40px;
  }

  .feature-list {
    row-gap: 26px;
  }

  .btn {
    padding: 9px 34px;
  }

  .footer-bottom {
    margin-top: 40px;
  }

  .marquee::before,
  .marquee::after {
    width: 40px;
  }
}

/* ---------- page-specific helpers ---------- */

.journal-image {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
}

.activities-head {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.form-block {
  grid-column: 4 / span 3;
}

.next-rule {
  margin: 56px 0;
}

@media (max-width: 991px) {
  .journal-image {
    max-width: 220px;
  }

  .next-rule {
    margin: 36px 0;
  }
}
