/* Harbour Star Limited — design system */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Noto+Sans+HK:wght@400;500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,500;0,8..60,600;1,8..60,400&display=swap');

:root {
  --bg: #0c1117;
  --bg-elevated: #141c26;
  --bg-card: #1a2433;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8edf4;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --accent: #d4a853;
  --accent-hover: #e8bc6a;
  --accent-muted: rgba(212, 168, 83, 0.15);
  --teal: #4db8a4;
  --teal-muted: rgba(77, 184, 164, 0.12);
  --danger: #f87171;
  --success: #4ade80;
  --font-sans: 'DM Sans', 'Noto Sans HK', system-ui, sans-serif;
  --font-serif: 'Source Serif 4', 'Noto Sans HK', Georgia, serif;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --container: 1160px;
  --header-h: 72px;
  --transition: 0.2s ease;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 17, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.logo:hover { color: var(--text); }
.logo-mark { color: var(--accent); flex-shrink: 0; }
.logo-name {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  display: block;
}
.logo-name-zh {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: var(--transition);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.25rem;
  flex-wrap: wrap;
}

.nav-main { display: flex; gap: 0.125rem; flex-wrap: wrap; }

.nav-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--text);
  background: var(--accent-muted);
}

.nav-more { position: relative; }
.nav-more summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more[open] summary { color: var(--text); background: var(--accent-muted); }
.nav-more-links {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.5rem;
  box-shadow: var(--shadow);
  z-index: 50;
}
.nav-more-links .nav-link { display: block; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.5rem;
}

.lang-switch {
  display: flex;
  align-items: center;
}
.lang-select {
  appearance: none;
  background-color: var(--bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 1.75rem 0.35rem 0.65rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.lang-select:hover { border-color: var(--accent); color: var(--text); }
.lang-select option { background: var(--bg-elevated); color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.35rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn-sm { font-size: 0.8rem; padding: 0.5rem 1rem; }
.btn-primary {
  background: var(--accent);
  color: #0c1117;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #0c1117;
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

/* Main */
main { flex: 1; }

/* Hero */
.hero {
  position: relative;
  padding: 4.5rem 0 5rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(212, 168, 83, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(77, 184, 164, 0.06), transparent);
  pointer-events: none;
  z-index: 1;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.07;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 2; }
.hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}
.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 1.75rem;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.badge {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.badge-accent {
  background: var(--accent-muted);
  border-color: rgba(212, 168, 83, 0.3);
  color: var(--accent);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Sections */
.section {
  padding: 4rem 0;
}
.section-alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}
.section-header {
  margin-bottom: 2.5rem;
  max-width: 640px;
}
.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
}
.section-header p {
  color: var(--text-muted);
  margin: 0;
}

/* Cards grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
/* Card with top image */
.card-with-img {
  padding: 0;
  overflow: hidden;
}
.card-with-img:hover { transform: translateY(-3px); }
.card-img {
  height: 190px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-elevated);
  position: relative;
}
.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(12,17,23,0.5) 100%);
}
.card-body { padding: 1.5rem; }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--teal-muted);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.card-body h3 { margin: 0 0 0.5rem; font-size: 1.05rem; font-weight: 600; }
.card p, .card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}
.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

/* Product category */
.category-block {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.category-block:last-child { border-bottom: none; }
.category-block h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}
.category-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.category-block ul {
  color: var(--text-muted);
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}
.category-block li { margin-bottom: 0.35rem; }
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 1rem;
}
.info-table th, .info-table td {
  text-align: left;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
}
.info-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 600;
  width: 35%;
}

/* Page header */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.75rem;
}
.page-header p {
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0;
}

/* Legal / prose */
.prose {
  max-width: 72ch;
  padding: 2.5rem 0 4rem;
}
.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}
.prose h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}
.prose p, .prose li {
  color: var(--text-muted);
}
.prose ul, .prose ol {
  padding-left: 1.25rem;
}
.prose li { margin-bottom: 0.4rem; }

.draft-banner {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #fca5a5;
}

.placeholder-tag {
  font-size: 0.7rem;
  color: var(--text-subtle);
  font-weight: 400;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.team-avatar {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  font-size: 0.75rem;
  text-align: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.team-info { padding: 1.25rem; }
.team-info h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.team-info .role { color: var(--accent); font-size: 0.85rem; margin-bottom: 0.5rem; }
.team-info p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}
.contact-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-details li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.contact-details strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  margin-bottom: 0.25rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}
.form-group textarea { min-height: 140px; resize: vertical; }
.checkbox-group {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.checkbox-group input { margin-top: 0.2rem; flex-shrink: 0; }
.checkbox-group input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-error {
  font-size: 0.82rem;
  color: var(--danger);
  margin-top: -0.75rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.75rem;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 6px;
}

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
  margin-top: 1.5rem;
}
.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Split feature */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
}
.stat-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent);
}
.stat-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.85fr 0.85fr 1.1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-legal-name {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.25rem;
}
.footer-legal-name-zh {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}
.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  max-width: 32ch;
}
.footer-hk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid rgba(212, 168, 83, 0.25);
  border-radius: 100px;
  padding: 0.3rem 0.75rem;
  margin: 0;
}
.site-footer h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  margin: 0 0 1rem;
}
.footer-requisites, .site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}
.footer-requisites li, .site-footer ul li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
}
.footer-note { margin: 0; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-strong);
  padding: 1.25rem 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}
.cookie-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-title {
  font-weight: 600;
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.cookie-text p:last-child {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 60ch;
}
.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Compliance checklist */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.check-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.check-list li::before {
  content: '✓';
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-row, .contact-grid { grid-template-columns: 1fr; }
  .feature-row.reverse { direction: ltr; }
  .category-block [style*="grid-template-columns"] {
    display: block !important;
  }
  .category-block [style*="grid-template-columns"] img {
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    margin-bottom: 1.5rem;
  }
}

/* Mobile nav overlay — rendered at <body> level to avoid backdrop-filter stacking context */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  flex-direction: column;
  align-items: stretch;
  padding: 1.25rem 1rem;
  gap: 0;
  overflow-y: auto;
  z-index: 200;
  border-top: 1px solid var(--border);
}
.mobile-nav-overlay.is-open { display: flex; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  /* Hide Chinese subtitle in logo to keep header single-line */
  .logo-name-zh { display: none !important; }

  /* Hide desktop nav inside header; mobile menu is handled by #mobile-nav-overlay */
  .site-nav { display: none !important; }

  .nav-main { flex-direction: column; }
  .nav-link {
    padding: 0.85rem 0.75rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-more { border-bottom: 1px solid var(--border); }
  .nav-more summary { padding: 0.85rem 0.75rem; font-size: 1rem; }
  .nav-more-links {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0.5rem 1rem;
    background: transparent;
  }
  .nav-more-links .nav-link { border-bottom: none; font-size: 0.95rem; }

  .header-actions {
    margin-left: 0;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .header-actions .btn { width: 100%; justify-content: center; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 3rem 0 3.5rem; }
  .section { padding: 2.5rem 0; }

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

  /* Info tables: stack on mobile */
  .info-table { font-size: 0.85rem; }
  .info-table thead { display: none; }
  .info-table tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
  }
  .info-table th {
    display: block;
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
  }
  .info-table td {
    display: block;
    width: 100%;
    border: none;
    padding: 0.5rem 0.75rem;
  }

  /* Prose */
  .prose { padding: 1.75rem 0 3rem; }

  /* Contact */
  .contact-grid { gap: 2rem; padding: 1.75rem 0 3rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
  .hero-lead { font-size: 1rem; }
  .card-with-img .card-img { height: 160px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
