/* ========================================================================
   OLIENZO — Shared Stylesheet
   ======================================================================== */

:root {
  --ink: #1a1a1a;
  --ink-soft: #2c2c2c;
  --paper: #f5f2ec;
  --paper-warm: #ebe6dc;
  --rule: #c9c2b4;
  --rule-soft: #d8d2c5;
  --accent: #5c4a2e;
  --accent-light: #b89568;
  --muted: #6b6356;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(92,74,46,0.02) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(92,74,46,0.02) 0%, transparent 40%);
  opacity: 0.6;
}

/* RTL support for Arabic */
body[dir="rtl"] { text-align: right; }
body[dir="rtl"] .nav-meta::before { display: none; }
body[dir="rtl"] .section-label::before,
body[dir="rtl"] .hero-eyebrow::before { margin-left: 0; margin-right: 0; }

/* Japanese typography adjustments */
body[lang="ja"] .serif,
body[lang="ja"] h1,
body[lang="ja"] h2,
body[lang="ja"] h3,
body[lang="ja"] h4,
body[lang="ja"] .section-title,
body[lang="ja"] .wordmark { letter-spacing: 0.02em; }

.serif { font-family: 'Cormorant Garamond', serif; font-weight: 400; }

/* ─── HEADER ──────────────────────────────────── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 28px 60px;
  background: rgba(245, 242, 236, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease, padding 0.4s ease;
}
header.scrolled {
  border-bottom-color: var(--rule-soft);
  padding: 20px 60px;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}
.wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark .dot { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 36px;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 36px;
}
nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s ease;
}
nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
nav a:hover { color: var(--accent); }
nav a:hover::after,
nav a.active::after { width: 100%; }
nav a.active { color: var(--accent); }

/* Language Selector */
.lang-selector {
  position: relative;
  border-left: 1px solid var(--rule);
  padding-left: 24px;
}
.lang-trigger {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease;
}
.lang-trigger:hover { color: var(--accent); }
.lang-trigger::after {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  margin-left: 4px;
  margin-bottom: 2px;
  transition: transform 0.3s ease;
}
.lang-trigger.open::after { transform: rotate(-135deg); margin-bottom: -2px; }
.lang-menu {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 200;
  box-shadow: 0 8px 28px rgba(26,26,26,0.06);
}
.lang-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 14px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  border-bottom: 1px solid var(--rule-soft);
}
.lang-menu button:last-child { border-bottom: none; }
.lang-menu button:hover { background: var(--paper-warm); color: var(--accent); }
.lang-menu button.current {
  color: var(--accent);
  font-weight: 500;
}
.lang-menu button .native {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-style: italic;
  margin-right: 10px;
}

/* ─── PAGE HERO (sub-pages) ───────────────────── */
.page-hero {
  padding: 200px 60px 100px;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--rule-soft);
}
.page-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
}
.page-hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
}
.page-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(44px, 5.5vw, 76px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 32px;
  max-width: 900px;
}
.page-hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
}
.page-hero-lead {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 640px;
}

/* ─── SECTION COMMONS ─────────────────────────── */
section { padding: 120px 60px; position: relative; z-index: 2; }
.container { max-width: 1400px; margin: 0 auto; }

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
}
.section-label::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
}
.section-label .num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 24px;
  max-width: 800px;
}
.section-title em { font-style: italic; color: var(--accent); font-weight: 300; }

/* ─── ALTERNATING SECTION BACKGROUNDS ─────────── */
.bg-warm { background: var(--paper-warm); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.bg-paper { background: var(--paper); }
.bg-ink { background: var(--ink); color: var(--paper); }
.bg-ink .section-label { color: rgba(245, 242, 236, 0.6); }
.bg-ink .section-label::before { background: var(--accent-light); }
.bg-ink .section-label .num { color: var(--accent-light); }
.bg-ink .section-title { color: var(--paper); }
.bg-ink .section-title em { color: var(--accent-light); }

/* ─── PROSE BLOCKS ────────────────────────────── */
.prose p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 28px;
  max-width: 720px;
}
.prose p.lead {
  font-size: 20px;
  color: var(--ink);
  font-weight: 300;
}
.prose p:first-child.dropcap::first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 72px;
  float: left;
  line-height: 0.85;
  margin: 8px 12px 0 0;
  color: var(--accent);
  font-weight: 400;
}
body[dir="rtl"] .prose p:first-child.dropcap::first-letter {
  float: right;
  margin: 8px 0 0 12px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 100px;
  align-items: start;
}
.two-col-sticky {
  position: sticky;
  top: 120px;
}

/* ─── FOOTER ─────────────────────────────────── */
footer {
  background: var(--ink);
  border-top: 1px solid rgba(245, 242, 236, 0.12);
  padding: 80px 60px 40px;
  color: rgba(245, 242, 236, 0.7);
}
.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(245, 242, 236, 0.12);
}
.footer-mark {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.22em;
  font-size: 22px;
  color: var(--paper);
  margin-bottom: 18px;
}
.footer-mark .dot { color: var(--accent-light); }
.footer-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--accent-light);
  font-size: 16px;
  margin-bottom: 24px;
}
.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245, 242, 236, 0.55);
  max-width: 320px;
}
.footer-col h5 {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.5);
  margin-bottom: 22px;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(245, 242, 236, 0.75);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.3s ease;
}
.footer-col a:hover { color: var(--accent-light); }
.footer-col .office-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: var(--paper);
  margin-bottom: 2px;
}
.footer-col .office-detail {
  font-size: 12px;
  color: rgba(245, 242, 236, 0.5);
  margin-bottom: 14px;
}
.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(245, 242, 236, 0.45);
}
.footer-bottom a {
  color: rgba(245, 242, 236, 0.6);
  text-decoration: none;
  margin-left: 24px;
  transition: color 0.3s ease;
}
.footer-bottom a:hover { color: var(--accent-light); }

/* ─── COOKIE BANNER ────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--paper);
  padding: 28px 32px;
  border: 1px solid rgba(245, 242, 236, 0.12);
  box-shadow: 0 12px 40px rgba(26, 26, 26, 0.18);
  z-index: 300;
  display: none;
  align-items: flex-start;
  gap: 32px;
}
.cookie-banner.show {
  display: flex;
  animation: cookie-slide 0.5s ease;
}
@keyframes cookie-slide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-content { flex: 1; }
.cookie-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--paper);
  margin-bottom: 8px;
}
.cookie-text {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(245, 242, 236, 0.7);
}
.cookie-text a {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 149, 104, 0.4);
}
.cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-btn {
  background: none;
  border: 1px solid rgba(245, 242, 236, 0.25);
  color: var(--paper);
  padding: 10px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.cookie-btn:hover { background: rgba(245, 242, 236, 0.08); border-color: rgba(245, 242, 236, 0.4); }
.cookie-btn.primary {
  background: var(--accent-light);
  color: var(--ink);
  border-color: var(--accent-light);
}
.cookie-btn.primary:hover { background: var(--paper); border-color: var(--paper); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ─── RESPONSIVE ───────────────────────────── */
@media (max-width: 980px) {
  header, .page-hero, section, footer { padding-left: 28px; padding-right: 28px; }
  header.scrolled { padding-left: 28px; padding-right: 28px; }
  nav ul { gap: 18px; }
  nav a { font-size: 10px; letter-spacing: 0.18em; }
  .nav-right { gap: 20px; }
  .lang-selector { padding-left: 16px; }
  .two-col { grid-template-columns: 1fr; gap: 50px; }
  .two-col-sticky { position: static; }
  .page-hero { padding-top: 150px; padding-bottom: 70px; }
  section { padding-top: 80px; padding-bottom: 80px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .footer-bottom > div:last-child a:first-child { margin-left: 0; }
  .cookie-banner { flex-direction: column; gap: 20px; padding: 24px; }
  .cookie-actions { flex-direction: row; width: 100%; }
  .cookie-btn { flex: 1; padding: 12px 16px; }
}
@media (max-width: 640px) {
  nav ul li:nth-child(n+3) { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
