:root {
  --bg: #eef5f7;
  --bg-soft: #e2eef2;
  --surface: #ffffff;
  --ink: #12262e;
  --muted: #5d7380;
  --line: #c9dde4;
  --teal: #0c7c72;
  --teal-dark: #085a53;
  --teal-soft: #d5f0ec;
  --sand: #d4a24a;
  --deep: #0b3a48;
  --hero-overlay: linear-gradient(110deg, rgba(8, 42, 52, 0.88) 0%, rgba(12, 90, 96, 0.55) 48%, rgba(8, 42, 52, 0.35) 100%);
  --shadow: 0 12px 32px rgba(11, 58, 72, 0.1);
  --radius: 14px;
  --nav-h: 72px;
  --max: 1120px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Sora", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, #d9f3ef 0%, transparent 42%),
    radial-gradient(circle at 90% 8%, #ffe8c4 0%, transparent 34%),
    linear-gradient(180deg, #f5fafb 0%, var(--bg) 40%, #e8f2f5 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal-dark);
  text-decoration: none;
}

a:hover {
  color: var(--teal);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--deep);
}

p {
  margin: 0 0 1em;
}

ul {
  padding-left: 1.2em;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 221, 228, 0.9);
  box-shadow: 0 4px 20px rgba(11, 58, 72, 0.06);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  min-width: 0;
}

.brand img {
  height: 40px;
  width: auto;
  max-height: calc(var(--nav-h) - 24px);
  object-fit: contain;
}

.brand span {
  white-space: nowrap;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.nav-desktop a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0;
  position: relative;
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.25s ease;
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1.5px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: var(--teal-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--teal);
  color: var(--teal-dark);
}

.btn-outline:hover {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.btn-light {
  background: #fff;
  color: var(--deep);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  color: var(--deep);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--nav-h);
  right: 0;
  width: min(320px, 88vw);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem;
  z-index: 999;
  transform: translateX(105%);
  transition: transform 0.28s ease;
  pointer-events: none;
}

.mobile-panel.open {
  transform: translateX(0);
  pointer-events: auto;
}

.mobile-panel a {
  display: block;
  padding: 0.85rem 0.6rem;
  color: var(--ink);
  border-bottom: 1px solid var(--bg-soft);
  font-weight: 500;
}

.mobile-panel .mobile-auth {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.mobile-panel .mobile-auth .btn {
  width: 100%;
}

.page-main {
  padding-top: var(--nav-h);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 4.5rem;
  animation: rise 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
  color: #fff;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.hero h1 {
  color: #fff;
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  font-weight: 600;
  max-width: 18ch;
  margin-bottom: 0.75rem;
}

.hero p {
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.section {
  padding: 4.2rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 40rem;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.intro-copy .lead {
  font-size: 1.08rem;
  color: var(--ink);
}

.intro-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: floaty 5s ease-in-out infinite;
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 180px;
  color: #fff;
  isolation: isolate;
  transition: transform 0.25s ease;
}

.category-item:hover {
  transform: translateY(-4px);
}

.category-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.category-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(8, 40, 50, 0.85) 100%);
  z-index: -1;
}

.category-item span {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(11, 58, 72, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.card-body h3 {
  font-size: 1.05rem;
  margin: 0;
}

.card-body h3 a {
  color: var(--deep);
}

.card-body p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}

.card-link {
  margin-top: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--teal);
}

.faq-list {
  display: grid;
  gap: 0.8rem;
  max-width: 760px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.2rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.95rem 0;
  list-style: none;
  font-family: var(--font-display);
  color: var(--deep);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  color: var(--muted);
  padding-bottom: 0.9rem;
}

.page-banner {
  background:
    linear-gradient(120deg, rgba(8, 58, 72, 0.92), rgba(12, 124, 114, 0.78)),
    url("banner.3dd2.webp") center/cover no-repeat;
  color: #fff;
  padding: 3.2rem 0 2.6rem;
}

.page-banner h1 {
  color: #fff;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin-bottom: 0.45rem;
}

.page-banner p {
  margin: 0;
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.88rem;
  margin-bottom: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
  color: #fff;
}

.breadcrumb .sep {
  opacity: 0.6;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.8rem;
}

.prose h2 {
  margin-top: 1.5rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin-top: 1.2rem;
  font-size: 1.12rem;
}

.prose img.cover {
  width: 100%;
  border-radius: 12px;
  margin: 0.4rem 0 1.2rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.side-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.side-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.side-list a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.65rem;
  align-items: center;
  color: var(--ink);
}

.side-list img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.side-list span {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.related {
  margin-top: 2rem;
}

.related h2 {
  margin-bottom: 1rem;
}

.legal-page .prose,
.about-page .prose {
  max-width: 800px;
  margin: 0 auto;
}

.error-page {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.site-footer {
  background: var(--deep);
  color: rgba(255, 255, 255, 0.86);
  padding: 3rem 0 1.5rem;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.82);
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.1rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
}

.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.brand-row img {
  height: 28px;
  width: auto;
  opacity: 0.75;
  filter: grayscale(0.2);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.feature-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 0.7rem;
}

.feature-item h3 {
  font-size: 1.05rem;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.list-page .cards {
  margin-top: 0.5rem;
}

.muted {
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 980px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .content-wrap,
  .footer-grid,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }
}

@media (max-width: 820px) {
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .mobile-panel {
    display: block;
  }

  .brand span {
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 64px;
  }

  .brand img {
    height: 34px;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    margin-bottom: 2.8rem;
  }

  .cards,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3rem 0;
  }

  .prose {
    padding: 1.2rem;
  }
}
