/* ================================================
   RUIEN TRADING HONGKONG CO., LIMITED
   styles.css — Navy & Gold, typography-focused
   ================================================ */

/* --- Custom Properties --- */
:root {
  --navy:        #0a192f;
  --navy-light:  #112240;
  --navy-mid:    #1a365d;
  --navy-border: #1e3a5f;

  --text:        #e6f1ff;
  --text-muted:  #8892b0;
  --text-dim:    #5a6a8a;

  --gold:        #c9a96e;
  --gold-light:  #d8be8a;
  --gold-dim:    rgba(201, 169, 110, 0.12);

  --font-display: Georgia, 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                  'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC',
                  'Noto Sans CJK TC', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--navy);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

/* --- Container --- */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================================================
   HEADER
   ================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(10, 25, 47, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navy-border);
  transition: background-color 0.3s ease;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.header-logo {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

/* --- Language Switcher (Dropdown) --- */
.lang-dropdown {
  position: relative;
  z-index: 200;
}

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--navy-border);
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 4px;
  letter-spacing: 0.04em;
  line-height: 1;
  min-width: 44px;
  white-space: nowrap;
}

.lang-trigger:hover,
.lang-trigger:focus-visible {
  border-color: var(--gold);
  color: var(--gold-light);
  outline: none;
}

.lang-trigger[aria-expanded="true"] {
  border-color: var(--gold);
  color: var(--gold);
}

.lang-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.lang-trigger[aria-expanded="true"] .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: var(--navy-light);
  border: 1px solid var(--navy-border);
  border-radius: 6px;
  list-style: none;
  padding: 4px;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.lang-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 12px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
  text-align: left;
  white-space: nowrap;
}

.lang-option:hover {
  background: var(--gold-dim);
  color: var(--gold-light);
}

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

.lang-option.active {
  color: var(--gold);
  font-weight: 600;
}

.lang-option-check {
  color: var(--gold);
  font-size: 0.7rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.lang-option.active .lang-option-check {
  opacity: 1;
}

/* ================================================
   HERO
   ================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind the hero text */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 600px 400px at 50% 35%, rgba(201, 169, 110, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* Very faint top-edge line */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--navy-border), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(24px);
  animation: heroFadeIn 1s ease 0.15s forwards;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-size: clamp(0.85rem, 1.6vw, 1.15rem);
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  opacity: 0;
  animation: taglineFadeIn 0.8s ease 0.5s forwards;
}

@keyframes taglineFadeIn {
  to { opacity: 1; }
}

.hero-divider {
  width: 0;
  height: 2px;
  background-color: var(--gold);
  margin: 2rem auto 0;
  border-radius: 1px;
  animation: dividerGrow 0.8s ease 0.8s forwards;
}

@keyframes dividerGrow {
  to { width: 60px; }
}

/* ================================================
   SECTIONS (shared)
   ================================================ */
.section {
  padding: 80px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.75rem);
  font-weight: 600;
  color: var(--gold);
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: 0.06em;
  position: relative;
}

/* Thin decorative underline for section titles */
.section-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background-color: var(--gold-dim);
  margin: 12px auto 0;
  border-radius: 1px;
}

/* ================================================
   ADDRESS
   ================================================ */
.address-section {
  background-color: var(--navy-light);
}

.address-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.address-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  background-color: rgba(10, 25, 47, 0.4);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.address-card:hover {
  border-color: rgba(201, 169, 110, 0.3);
  background-color: rgba(10, 25, 47, 0.6);
}

.address-lang-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background-color: var(--gold-dim);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.address-line {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-line;
}

/* ================================================
   CONTACT
   ================================================ */
.contact-section {
  background-color: var(--navy);
}

/* --- Gate (Turnstile + prompt) --- */
.contact-gate {
  text-align: center;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.contact-gate.gate-hidden {
  opacity: 0;
  pointer-events: none;
}

.gate-prompt {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

/* --- Revealed contact info --- */
.contact-info {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(12px);
  transition: max-height 0.7s ease, opacity 0.7s ease, transform 0.7s ease;
}

.contact-info.visible {
  max-height: 400px;
  opacity: 1;
  transform: translateY(0);
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  background-color: rgba(17, 34, 64, 0.5);
  transition: border-color 0.3s ease, background-color 0.3s ease,
              transform 0.2s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
  border-color: var(--gold);
  background-color: var(--navy-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.contact-icon-wrap {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--gold-dim);
  color: var(--gold);
}

.contact-icon-wrap svg {
  stroke: currentColor;
}

.contact-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.contact-value {
  font-size: 1rem;
  color: var(--text);
  transition: color 0.25s ease;
  word-break: break-all;
}

.contact-value:hover {
  color: var(--gold-light);
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  border-top: 1px solid var(--navy-border);
  padding: 40px 0 32px;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.footer-copyright {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ================================================
   RESPONSIVE
   ================================================ */

/* Tablet & below */
@media (max-width: 768px) {
  .header-inner {
    height: 56px;
  }

  .header-logo {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
  }

  .lang-btn {
    padding: 5px 10px;
    font-size: 0.7rem;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    margin-bottom: 2rem;
  }

  .address-block {
    gap: 12px;
  }

  .address-card {
    padding: 14px 16px;
  }

  .contact-item {
    padding: 14px 16px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .header-logo {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
  }

  .lang-btn {
    padding: 4px 8px;
    font-size: 0.65rem;
  }

  .hero {
    padding: 90px 0 50px;
  }

  .hero-divider {
    margin-top: 1.5rem;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    margin-bottom: 1.5rem;
  }

  .address-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .address-lang-label {
    width: 28px;
    height: 28px;
    font-size: 0.6rem;
  }

  .address-line {
    font-size: 0.85rem;
  }

  .gate-prompt {
    font-size: 0.9rem;
  }

  .contact-item {
    padding: 12px 14px;
    gap: 12px;
  }

  .contact-icon-wrap {
    width: 34px;
    height: 34px;
  }

  .contact-icon-wrap svg {
    width: 15px;
    height: 15px;
  }

  .contact-value {
    font-size: 0.9rem;
  }

  .footer-name {
    font-size: 0.7rem;
  }
}

/* Tablet & above — address side by side */
@media (min-width: 768px) {
  .address-block {
    flex-direction: row;
  }

  .address-card {
    flex: 1;
  }
}

/* Large desktop */
@media (min-width: 1024px) {
  .hero-title {
    letter-spacing: 0.06em;
  }
}

/* ================================================
   Turnstile overrides (keep widget tidy on dark bg)
   ================================================ */
.cf-turnstile {
  display: inline-flex;
}
