:root {
  --bg: #f5efe0;
  --ink: #1a1a1a;
  --gold: #c9a227;
  --green: #0b3d2e;
  --burgundy: #7a1f2b;
  --muted: #3f382f;
  --line: rgba(201, 162, 39, 0.55);
  --hairline: rgba(26, 26, 26, 0.12);
  --serif: "Noto Serif Thai", "Leelawadee UI", "Thonburi", serif;
  --sans: "Sarabun", "Leelawadee UI", "Tahoma", sans-serif;
  --page: 72rem;
  --header: 4.6rem;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 12% -10%, rgba(201, 162, 39, 0.08), transparent 42%),
    radial-gradient(ellipse at 100% 0%, rgba(122, 31, 43, 0.05), transparent 36%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.85;
  text-align: left;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

::selection {
  background: var(--green);
  color: var(--bg);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--green);
  border-bottom: 1px solid var(--gold);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.55rem 1.15rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.65rem;
  color: var(--bg);
  text-decoration: none;
}

.site-header__spacer {
  flex: 1 1 auto;
  min-width: 0.75rem;
}

.brand__mark {
  display: block;
  width: 28px;
  height: 28px;
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}

.site-nav {
  order: 3;
  flex: 1 0 100%;
  display: flex;
  justify-content: center;
  gap: 1.15rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.15rem;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  color: var(--bg);
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.98rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--gold);
}

.cta {
  appearance: none;
  border: 0;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.62rem 0.95rem;
  cursor: pointer;
}

.cta:hover {
  background: #b8921f;
}

.cta:focus-visible {
  outline-color: var(--bg);
}

.hero {
  display: grid;
  gap: 1.75rem;
  max-width: var(--page);
  margin: 0 auto;
  padding: 2.1rem 1.15rem 2.6rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--burgundy);
  font-weight: 600;
  font-size: 0.98rem;
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.45rem, 8vw, 4.4rem);
  line-height: 1.35;
}

.dek {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.9;
}

.hero__figure {
  margin: 0;
}

.hero__figure img,
.frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(11, 61, 46, 0.45);
}

.toc {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.5rem 1.15rem 2.75rem;
}

.toc h2 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.4;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0.2rem 0 0.2rem 0;
  border-left: 1px solid var(--gold);
}

.toc a {
  position: relative;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.35rem 0.85rem;
  align-items: baseline;
  padding: 0.82rem 0 0.82rem 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.toc a::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 1.35rem;
  width: 7px;
  height: 7px;
  background: var(--bg);
  border: 1px solid var(--burgundy);
  border-radius: 50%;
}

.toc__num {
  color: var(--burgundy);
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
}

.toc a:hover .toc__name,
.toc a:focus-visible .toc__name {
  color: var(--green);
}

.chapter,
.faq-section {
  scroll-margin-top: 7.5rem;
}

.chapter {
  padding: 2.6rem 0 0.4rem;
  border-top: 1px solid var(--line);
}

.chapter__head,
.prose {
  max-width: var(--page);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}

.chapter__kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.35rem;
}

.chapter__num {
  color: var(--burgundy);
  font-family: var(--serif);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.chapter__line {
  width: 3.25rem;
  height: 1px;
  background: var(--gold);
}

.chapter h2,
.faq-section h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  line-height: 1.45;
}

.frame {
  max-width: var(--page);
  margin: 1.5rem auto 0.4rem;
  padding: 0 1.15rem;
}

.prose {
  padding-top: 1.35rem;
  padding-bottom: 1.5rem;
}

.prose p,
.modal__body p,
.faq p {
  margin: 0 0 1.1rem;
}

.prose h3,
.timeline h3,
.modal__body h3 {
  margin: 1.85rem 0 0.45rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.32rem;
  line-height: 1.5;
  color: var(--green);
}

.prose p,
.faq p,
.modal__body p,
.timeline p {
  font-size: 1.125rem;
  line-height: 1.9;
}

.pull {
  margin: 1.6rem 0 1.7rem;
  padding: 0.15rem 0 0.15rem 1.05rem;
  border-left: 2px solid var(--burgundy);
}

.pull p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.38rem;
  line-height: 1.65;
  color: var(--green);
}

.timeline {
  list-style: none;
  margin: 1.6rem 0 0.4rem;
  padding: 0.2rem 0 0;
  border-left: 1px solid var(--gold);
}

.timeline li {
  position: relative;
  padding: 0 0 1.45rem 1.15rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.55rem;
  width: 7px;
  height: 7px;
  background: var(--bg);
  border: 1px solid var(--burgundy);
  border-radius: 50%;
}

.timeline h3 {
  margin-top: 0;
}

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

.term {
  font-style: italic;
}

.faq-section {
  padding: 2.6rem 0 1rem;
  border-top: 1px solid var(--line);
}

.faq__intro {
  margin-top: 1rem;
  color: var(--muted);
}

.faq details {
  border-top: 1px solid var(--hairline);
}

.faq details:last-child {
  border-bottom: 1px solid var(--hairline);
}

.faq summary {
  position: relative;
  padding: 1rem 2rem 1rem 0;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.55;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0.95rem;
  color: var(--burgundy);
  font-family: var(--sans);
  font-size: 1.25rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0;
  padding: 0 0 1.15rem;
}

.site-footer {
  background: var(--green);
  color: var(--bg);
  border-top: 1px solid var(--gold);
}

.site-footer__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 2.15rem 1.15rem 1.75rem;
}

.site-footer__name {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.4;
}

.site-footer__note {
  margin: 0 0 1.4rem;
  line-height: 1.8;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.25rem 0;
  color: var(--bg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  cursor: pointer;
}

.footer__link:hover {
  color: var(--gold);
}

.site-footer__fine {
  margin: 1.5rem 0 0;
  color: rgba(245, 239, 224, 0.82);
  font-size: 0.92rem;
  line-height: 1.7;
}

.noscript {
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 25;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid var(--gold);
  background: var(--green);
  color: var(--bg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.to-top:hover {
  color: var(--gold);
}

.to-top:focus-visible {
  outline-color: var(--bg);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.15rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 61, 46, 0.72);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(40rem, 100%);
  max-height: min(86vh, 42rem);
  overflow: auto;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--gold);
  padding: 1.4rem 1.2rem 1.5rem;
}

.modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal__panel h2 {
  margin: 0 2.2rem 0.9rem 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.45;
}

.modal__body a {
  color: var(--burgundy);
}

a[href="https://grandyachtclub.com/"] {
  color: var(--burgundy);
  font-weight: 600;
  text-decoration: none;
}

a[href="https://grandyachtclub.com/"]:hover,
a[href="https://grandyachtclub.com/"]:focus-visible {
  color: var(--green);
  text-decoration: none;
}

main:focus {
  outline: none;
}

@media (min-width: 768px) {
  .site-header__inner,
  .hero,
  .toc,
  .frame,
  .site-footer__inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .chapter__head,
  .prose {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .hero {
    padding-top: 3.4rem;
    padding-bottom: 3.4rem;
  }

  .chapter,
  .faq-section {
    padding-top: 3.4rem;
  }

  .modal__panel {
    padding: 1.8rem 1.8rem 2rem;
  }
}

@media (min-width: 1024px) {
  .site-header__inner {
    flex-wrap: nowrap;
  }

  .site-nav {
    order: 0;
    flex: 0 1 auto;
    justify-content: flex-start;
    overflow: visible;
    padding-bottom: 0;
  }

  .chapter,
  .faq-section {
    scroll-margin-top: 5.4rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: end;
    gap: 3.25rem;
    padding-top: 4.2rem;
    padding-bottom: 4rem;
  }

  .toc {
    padding-bottom: 3.5rem;
  }

  .toc ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
    border-left: 0;
  }

  .toc li {
    border-left: 1px solid var(--gold);
  }
}

@media (max-width: 389px) {
  .brand__name {
    font-size: 1.05rem;
  }

  .cta {
    padding: 0.55rem 0.7rem;
    font-size: 0.875rem;
  }

  .prose p,
  .faq p,
  .timeline p {
    font-size: 1.0625rem;
  }
}

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

  .to-top {
    transition: none;
  }
}
