/* global.css — base reset, typography, shared components */

/* ─── Google Fonts ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap');

/* ─── CSS Custom Properties (overridden by theme.json) ─── */
:root {
  --color-bg:            #ffffff;
  --color-bg-subtle:     #f7f7f5;
  --color-text-primary:  #111111;
  --color-text-secondary:#666666;
  --color-text-muted:    #aaaaaa;
  --color-accent:        #111111;
  --color-border:        rgba(0,0,0,0.10);
  --color-border-strong: rgba(0,0,0,0.22);
  --font-display:        'Fraunces', serif;
  --font-body:           'DM Sans', sans-serif;
  --radius-pill:         44px;
  --radius-card:         2px;
  --motion-ease:         cubic-bezier(0.22,1,0.36,1);
  --motion-fast:         0.18s;
  --motion-mid:          0.35s;
  --motion-slow:         0.6s;
  --header-h:            68px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
}

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

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

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem,  4vw, 3.6rem); }
h3 { font-size: clamp(1.3rem,2vw, 1.8rem); }
h4 { font-size: 0.875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-body); }

p { max-width: 58ch; }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease, border-color var(--motion-fast) ease;
  white-space: nowrap;
}

.btn-primary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn-secondary {
  background: var(--color-accent);
  color: #fff;
  border: 1px solid var(--color-accent);
}
.btn-secondary:hover {
  background: transparent;
  color: var(--color-text-primary);
}

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 60px);
  transition: background var(--motion-mid) ease, box-shadow var(--motion-mid) ease;
}

.site-header.scrolled {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.header-logo svg { flex-shrink: 0; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-secondary);
  transition: color var(--motion-fast) ease;
}
.header-nav a:hover, .header-nav a.active { color: var(--color-text-primary); }
.header-nav .btn-primary { color: var(--color-text-primary); }
.header-nav .btn-primary:hover { color: #fff; }

/* ─── Hamburger ────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 1px;
  background: var(--color-text-primary);
  transition: transform var(--motion-mid) var(--motion-ease), opacity var(--motion-fast) ease;
}

/* ─── Mobile Nav ─────────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  top: 0; right: 0;
  width: 50%;
  height: 100%;
  background: var(--color-bg);
  z-index: 300;
  padding: 80px 32px 40px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--motion-slow) var(--motion-ease);
  box-shadow: -4px 0 40px rgba(0,0,0,0.08);
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-text-primary);
  transition: opacity var(--motion-fast) ease;
}
.mobile-nav a:hover { opacity: 0.5; }

.mobile-nav-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-text-primary);
  display: flex; align-items: center; justify-content: center;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 299;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-mid) ease;
}
.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--color-bg-subtle);
  border-top: 1px solid var(--color-border);
  padding: 72px clamp(20px, 6vw, 100px) 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 28px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 28ch;
}

.footer-logo-link {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  margin-bottom: 6px;
  color: var(--color-text-primary);
}

.footer-col a {
  font-size: 13px;
  color: var(--color-text-secondary);
  transition: color var(--motion-fast) ease;
}
.footer-col a:hover { color: var(--color-text-primary); }

.footer-bottom {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ─── Page wrapper ─────────────────────────────────────────── */
.page-content {
  padding-top: var(--header-h);
}

/* ─── Section utility ──────────────────────────────────────── */
.section {
  padding: clamp(80px, 10vw, 140px) clamp(20px, 6vw, 100px);
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .hamburger  { display: flex; }

  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
  .mobile-nav   { width: 100%; }
}
