/* ============================================
   新葡特色站 · 岛礁蓝图 Site Kit
   /assets/site.css
   ============================================ */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--deep-sea-gray);
  background-color: var(--beach-sand);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
  width: 100%;
}

main:focus {
  outline: none;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

a {
  color: var(--coral);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

a:hover {
  color: var(--twilight);
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--coral);
  color: var(--white);
}

:focus-visible {
  outline: 3px solid var(--twilight);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Design Tokens ---------- */
:root {
  --deep-sea: #0B3C5D;
  --coral: #FF6F61;
  --coral-soft: #FF9A8F;
  --coconut: #8B5A2B;
  --tropical-green: #00A86B;
  --beach-sand: #F5E6D3;
  --light-sea: #E0F7FA;
  --deep-sea-gray: #2D3E4F;
  --white: #FFFFFF;
  --twilight: #8AB4F8;
  --leaf-green: #2E8B57;

  --font-heading: 'Archivo Black', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Source Serif', 'Noto Serif SC', 'Songti SC', serif;
  --font-mono: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;

  --header-height: 76px;
  --page-pad: clamp(20px, 4vw, 48px);
  --radius: 14px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.3s;
  --container: 1280px;
  --max-text: 720px;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.15;
  color: var(--deep-sea);
  text-wrap: balance;
}

p {
  max-width: var(--max-text);
  margin-bottom: 1em;
}

p:empty {
  display: none;
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--coconut);
}

.data-point {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--coconut);
}

.data-point::before {
  content: '▹';
  color: var(--coral);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
}

.section-tag::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--coral);
  flex: none;
}

.section-heading {
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.section {
  padding-block: clamp(48px, 7vw, 96px);
}

.page-body {
  flex: 1 0 auto;
  padding-top: var(--header-height);
}

.page-hero {
  position: relative;
  padding-top: calc(var(--header-height) + clamp(48px, 8vw, 104px));
  padding-bottom: clamp(40px, 6vw, 72px);
}

.page-hero__title {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  max-width: 15em;
  color: var(--deep-sea);
}

.page-hero__lead {
  max-width: 540px;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.7;
  color: var(--deep-sea-gray);
}

/* ---------- Blueprint Background ---------- */
.blueprint-bg {
  background-color: var(--beach-sand);
  background-image:
    linear-gradient(rgba(11, 60, 93, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 60, 93, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(139, 90, 43, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 90, 43, 0.04) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px;
}

/* ---------- Grid & Card ---------- */
.grid {
  display: grid;
  gap: clamp(18px, 2.6vw, 32px);
}

.grid--2 {
  grid-template-columns: 1fr;
}

.grid--3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

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

.card {
  background-color: var(--light-sea);
  border: 1px solid rgba(139, 90, 43, 0.14);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 111, 97, 0.45);
  box-shadow: 0 14px 32px rgba(11, 60, 93, 0.1);
}

.card__title {
  margin-bottom: 8px;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn--primary {
  background-color: var(--coral);
  border-color: var(--coral);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(255, 111, 97, 0.35);
}

.btn--primary:hover {
  background-color: #ff5748;
  border-color: #ff5748;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 111, 97, 0.45);
}

.btn--ghost {
  background: transparent;
  border-color: var(--deep-sea);
  color: var(--deep-sea);
}

.btn--ghost:hover {
  background: var(--deep-sea);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--compact {
  padding: 10px 20px;
  font-size: 13px;
}

/* ---------- Status Pill ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status-pill--green {
  background: rgba(0, 168, 107, 0.12);
  border-color: rgba(0, 168, 107, 0.35);
  color: var(--leaf-green);
}

.status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tropical-green);
  animation: pulse-dot 2.4s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 168, 107, 0.35);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(0, 168, 107, 0);
  }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 24px 0 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.breadcrumbs a {
  color: var(--deep-sea);
  border-bottom: 1px dashed rgba(139, 90, 43, 0.45);
}

.breadcrumbs a:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.breadcrumbs__sep {
  color: var(--coconut);
  opacity: 0.65;
}

.breadcrumbs [aria-current="page"] {
  color: var(--coral);
}

/* ---------- Image Frame ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--light-sea);
  background-image:
    linear-gradient(rgba(11, 60, 93, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 60, 93, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid rgba(139, 90, 43, 0.15);
}

.img-frame::before {
  content: '';
  display: block;
}

.img-frame--16-9::before {
  padding-bottom: 56.25%;
}

.img-frame--4-3::before {
  padding-bottom: 75%;
}

.img-frame--1-1::before {
  padding-bottom: 100%;
}

.img-frame--portrait::before {
  padding-bottom: 125%;
}

.img-frame .img-frame__media,
.img-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame__caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(11, 60, 93, 0.82);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.img-frame[data-placeholder]::after {
  content: attr(data-placeholder);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(11, 60, 93, 0.55);
  text-transform: uppercase;
  pointer-events: none;
}

/* ---------- Index Table ---------- */
.index-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(139, 90, 43, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.index-table th,
.index-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(139, 90, 43, 0.12);
}

.index-table th {
  background: var(--light-sea);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--deep-sea);
}

.index-table tbody tr:last-child td {
  border-bottom: none;
}

.index-table td:first-child {
  font-family: var(--font-mono);
  color: var(--coconut);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, rgba(139, 90, 43, 0.5) 0 6px, transparent 6px 12px);
}

.timeline__item {
  position: relative;
  padding-bottom: 30px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
  border: 3px solid var(--beach-sand);
  box-shadow: 0 0 0 2px rgba(255, 111, 97, 0.3);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.timeline__item[data-active]::before {
  transform: scale(1.3);
  box-shadow: 0 0 0 4px rgba(255, 111, 97, 0.35);
}

.timeline__date {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--coconut);
}

/* ---------- Scroll Spy ---------- */
[data-scroll-spy] {
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

[data-scroll-spy-target] {
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

[data-scroll-spy-target].is-active {
  color: var(--coral);
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--coral);
  background: var(--deep-sea);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  transform: translateY(-120%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--white);
}

/* ---------- Scroll Progress ---------- */
.site-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1500;
  background: rgba(11, 60, 93, 0.16);
  pointer-events: none;
}

.site-progress__bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--tropical-green));
}

/* ---------- Site Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: linear-gradient(to bottom, rgba(11, 60, 93, 0.55), rgba(11, 60, 93, 0.18) 70%, transparent);
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), background-image 0.35s var(--ease);
}

.site-header[data-scrolled="true"] {
  background-color: var(--deep-sea);
  background-image: linear-gradient(135deg, rgba(255, 111, 97, 0.05), transparent 40%);
  box-shadow: 0 4px 24px rgba(11, 60, 93, 0.28);
}

.site-header__inner {
  position: relative;
  z-index: 6;
  max-width: var(--container);
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 24px);
}

/* ---------- Brand ---------- */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--white);
}

.site-brand:hover {
  color: var(--white);
}

.site-brand__mark {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--coral), #ff9a8f);
  box-shadow: 0 4px 14px rgba(255, 111, 97, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transform: rotate(45deg);
}

.site-brand__glyph {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  color: var(--white);
  transform: rotate(-45deg);
}

.site-brand__text {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.site-brand__cn {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: var(--white);
}

.site-brand__en {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--twilight);
}

.site-brand--footer {
  gap: 14px;
}

.site-brand--footer .site-brand__mark {
  width: 44px;
  height: 44px;
}

/* ---------- Header Nav ---------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 22px);
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 8px 2px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.9);
}

.site-nav__link:hover {
  color: var(--coral-soft);
}

.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

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

.site-nav__link[aria-current="page"] {
  color: var(--white);
}

.site-nav__num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--twilight);
  transform: translateY(-1px);
}

.site-cta {
  flex-shrink: 0;
}

/* ---------- Nav Toggle ---------- */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 8;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 11px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.25s var(--ease);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

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

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

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

/* ---------- Mobile Nav ---------- */
@media (max-width: 1024px) {
  .nav-toggle {
    display: flex;
  }

  .site-cta {
    display: none;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    padding: clamp(24px, 5vh, 48px) var(--page-pad) 48px;
    background: rgba(11, 60, 93, 0.98);
    border-top: 2px solid var(--coral);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }

  .site-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav .site-nav__link {
    width: 100%;
    padding: 14px 8px;
    font-size: clamp(1.15rem, 4vw, 1.6rem);
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-nav .site-nav__link::after {
    display: none;
  }

  .site-nav .site-nav__link[aria-current="page"] {
    color: var(--white);
    border-bottom: 1px solid var(--coral);
  }

  .site-nav .site-nav__num {
    font-size: 11px;
  }
}

/* ---------- Site Footer ---------- */
.site-footer {
  position: relative;
  flex: none;
  margin-top: clamp(40px, 8vw, 96px);
  padding: clamp(44px, 6vw, 72px) 0 0;
  background-color: var(--deep-sea);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  color: rgba(255, 255, 255, 0.78);
  border-top: 3px solid var(--coral);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(255, 111, 97, 0.45);
  pointer-events: none;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1.5fr 0.9fr 0.9fr 1.4fr;
  }
}

.site-footer__block--brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.site-footer__desc {
  max-width: 32em;
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer__trust {
  margin: 0;
}

.site-footer__heading {
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
}

.site-footer__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.site-footer__nav a {
  padding: 2px 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
}

.site-footer__nav a::before {
  content: '›';
  margin-right: 8px;
  font-family: var(--font-mono);
  color: var(--coral);
}

.site-footer__nav a:hover {
  color: var(--white);
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__contact-line {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.site-footer__contact-label {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--twilight);
}

.site-footer__bottom {
  margin-top: clamp(36px, 5vw, 56px);
  padding: 20px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer__copyright {
  margin: 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
