/* ═══════════════════════════════════════════════
   Serene Orient — API Site Styles
   Matches WordPress theme design system
   ═══════════════════════════════════════════════ */

/* DESIGN TOKENS */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --surface-dark: #102c24;
  --fg: #1a1a18;
  --ink: #1a1a18;
  --muted: #5f584f;
  --border: #e0e0e0;
  --border-light: #eeeeee;
  --primary: #b66a43;
  --primary-hover: #9d5837;
  --clay: #b66a43;
  --clay-deep: #85492f;
  --accent: #c6a15b;
  --gold: #c6a15b;
  --gold-dim: rgba(198, 161, 91, 0.26);
  --accent-soft: rgba(198, 161, 91, 0.12);
  --cream: #fffaf2;

  /* Five Elements */
  --forest: #173c31;
  --forest-soft: #285a48;
  --wood: #4a8c5c;
  --fire: #c94a3e;
  --earth: #c99532;
  --metal: #a69e8d;
  --water: #3a7cb8;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Radius — match WordPress theme (all square) */
  --radius-sm: 0px;
  --radius: 0px;
  --radius-lg: 0px;
  --radius-pill: 0px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(43, 31, 20, 0.06);
  --shadow-md: 0 4px 16px rgba(43, 31, 20, 0.08);
  --shadow-lg: 0 8px 32px rgba(43, 31, 20, 0.10);
  --shadow: 0 8px 32px rgba(43, 31, 20, 0.10);
  --soft-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);

  /* Layout */
  --max-w: 1200px;
  --white-72: rgba(255, 255, 255, 0.72);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }
input, select, textarea { font-family: inherit; }

/* Focus-visible */
:focus-visible {
  outline: 2px solid var(--wood, #4a8c5c);
  outline-offset: 2px;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--wood, #4a8c5c);
  outline-offset: 2px;
}

/* ═══ HEADER ═══ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
}

.site-logo {
  display: flex;
  align-items: center;
}
.site-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.site-logo img {
  height: 36px !important;
  width: auto !important;
  max-width: 160px;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-desktop__item { position: relative; }
.nav-desktop__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  position: relative;
  padding: 4px 0;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-desktop__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--primary);
  transition: width 0.25s ease;
}
.nav-desktop__link:hover { color: var(--primary); }
.nav-desktop__link:hover::after { width: 100%; }

/* Nav Dropdown */
.nav-desktop__dropdown {
  position: absolute;
  top: 100%;
  left: -16px;
  padding-top: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}
.nav-desktop__item:hover .nav-desktop__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-desktop__dropdown-inner {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow-elevated, 0 2px 4px rgba(43,31,20,0.04), 0 8px 24px rgba(43,31,20,0.08));
  min-width: 200px;
}
.nav-desktop__dropdown-inner a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
}
.nav-desktop__dropdown-inner a:hover { background: var(--surface-alt); }

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-actions__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  transition: background 0.2s;
  position: relative;
  text-decoration: none;
}
.nav-actions__btn:hover { background: var(--surface-alt); }
.nav-actions__btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--fg);
  transition: all 0.3s;
}
/* Hamburger → X animation */
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  z-index: 1000;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.mobile-drawer.is-open { display: block; }
.mobile-drawer a {
  display: block;
  padding: 11px 0;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--fg);
}
.mobile-drawer a:last-child { border-bottom: none; }
.mobile-drawer a:hover { color: var(--primary); }
.mobile-drawer[aria-hidden="true"] { display: none; }

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .nav-actions__btn:first-of-type { display: none; }
}

/* ═══ FOOTER ═══ */
.site-footer {
  background: var(--surface-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 64px 0 32px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  margin-bottom: 48px;
}
.footer-brand__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}
.footer-brand__desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  max-width: 300px;
}
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
}
.footer-social a:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}
.footer-social svg {
  width: 16px;
  height: 16px;
  stroke: rgba(255, 255, 255, 0.7);
  fill: none;
  stroke-width: 1.6;
}

.footer-col__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  padding: 5px 0;
  transition: color 0.2s;
  text-decoration: none;
}
.footer-col a:hover { color: #fff; }

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 24px 0;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-footer__copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}
.site-footer__legal {
  display: flex;
  gap: 20px;
}
.site-footer__legal a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
}
.site-footer__legal a:hover { color: rgba(255, 255, 255, 0.7); }

@media (max-width: 768px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 500px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* SR only */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
