/* ============================================================
   FINLEY O NYABUGA — Editorial Portfolio
   Shared Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;0,900;1,400;1,700&family=Lora:ital,wght@0,400;0,500;1,400&family=DM+Mono:wght@300;400;500&display=swap');

/* ---- TOKENS ---- */
:root {
  --paper:        #f7f4ef;
  --paper-warm:   #f0ebe2;
  --paper-deep:   #e8e1d5;
  --ink:          #111008;
  --ink-2:        #2a2720;
  --ink-3:        #5a5548;
  --ink-4:        #9a9285;
  --ink-5:        #c8c0b4;
  --rule:         #d8d0c4;

  --accent:       #c9390a;   /* burnt sienna — editorial red */
  --accent-soft:  rgba(201,57,10,0.08);
  --accent-mid:   rgba(201,57,10,0.18);

  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'Lora', 'Georgia', serif;
  --font-mono:    'DM Mono', monospace;

  --header-h:     72px;
  --max-w:        1200px;
  --gutter:       clamp(20px, 5vw, 48px);

  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --t:            0.28s;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img  { display: block; width: 100%; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
button, input, textarea, select { font-family: inherit; }

/* ---- GRAIN TEXTURE OVERLAY ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ---- TYPOGRAPHY SCALE ---- */
.t-display {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.02em;
}
.t-headline {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.t-title {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
}
.t-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.t-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---- LAYOUT ---- */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 100px 0;
}

/* ---- HEADER ---- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 800;
  background: rgba(247, 244, 239, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow var(--t) var(--ease);
}
#site-header.scrolled {
  box-shadow: 0 2px 20px rgba(17,16,8,0.08);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Wordmark logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--rule);
  flex-shrink: 0;
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.logo-mark-fb {
  display: none;
  width: 100%; height: 100%;
  align-items: center; justify-content: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
}
.logo-text-wrap { line-height: 1.2; }
.logo-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Desktop nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 6px 14px;
  border-radius: 4px;
  transition: color var(--t), background var(--t);
  position: relative;
}
.nav-a::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 14px; right: 14px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.nav-a:hover, .nav-a.active { color: var(--ink); }
.nav-a:hover::after, .nav-a.active::after { transform: scaleX(1); }

.nav-cta {
  margin-left: 12px;
  padding: 8px 20px !important;
  background: var(--ink);
  color: var(--paper) !important;
  border-radius: 2px;
  font-weight: 500;
  transition: background var(--t), transform var(--t) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  background: var(--accent) !important;
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: var(--t) var(--ease);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---- MOBILE DRAWER ---- */
.drawer-veil {
  display: none;
  position: fixed; inset: 0;
  background: rgba(17,16,8,0.5);
  z-index: 850;
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.drawer-veil.show { opacity: 1; }

.mobile-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(340px, 88vw);
  height: 100%;
  background: var(--paper);
  border-left: 1px solid var(--rule);
  z-index: 860;
  transform: translateX(100%);
  transition: transform 0.38s var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mobile-drawer.open { transform: translateX(0); }

/* Decorative ruled left stripe */
.mobile-drawer::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent);
}

.drawer-head {
  padding: 24px 28px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.drawer-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--rule);
  flex-shrink: 0;
}
.drawer-avatar img { width:100%; height:100%; object-fit: cover; object-position: top; }
.drawer-p-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.drawer-p-role {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}

.drawer-x {
  background: none;
  border: 1px solid var(--rule);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 1rem;
  transition: all var(--t);
  flex-shrink: 0;
}
.drawer-x:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.drawer-nav-list {
  flex: 1;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 4px;
  overflow: hidden;
  transition: background var(--t);
  cursor: pointer;
}

.drawer-item-num {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--ink-5);
  width: 36px;
  flex-shrink: 0;
  padding: 14px 0 14px 16px;
}

.drawer-item-label {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink-2);
  padding: 14px 16px;
  position: relative;
  transition: color var(--t), padding var(--t);
}

.drawer-item:hover, .drawer-item.active { background: var(--paper-warm); }
.drawer-item:hover .drawer-item-label, .drawer-item.active .drawer-item-label { color: var(--accent); padding-left: 20px; }
.drawer-item:hover .drawer-item-num, .drawer-item.active .drawer-item-num { color: var(--accent); }

.drawer-item-arr {
  font-size: 0.85rem;
  color: var(--ink-5);
  padding-right: 20px;
  transition: color var(--t), transform var(--t);
}
.drawer-item:hover .drawer-item-arr, .drawer-item.active .drawer-item-arr { color: var(--accent); transform: translateX(5px); }

.drawer-foot {
  padding: 20px 28px;
  border-top: 1px solid var(--rule);
}
.drawer-avail {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-4);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.avail-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2db36f;
  box-shadow: 0 0 6px #2db36f;
  animation: blink 2.5s ease-in-out infinite;
}
@keyframes blink {
  0%,100% { opacity:1; } 50% { opacity: 0.4; }
}
.drawer-socials {
  display: flex; gap: 16px;
}
.drawer-socials a {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
  transition: color var(--t);
}
.drawer-socials a:hover { color: var(--accent); }

/* ---- FOOTER ---- */
#site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 0;
  border-top: 2px solid var(--accent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(201,57,10,0.3);
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.footer-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(247,244,239,0.7);
  letter-spacing: 0.02em;
  line-height: 1.6;
}
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247,244,239,0.4);
  margin-bottom: 18px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-links a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(247,244,239,0.8);
  transition: color var(--t), transform var(--t);
}
.footer-links a:hover { color: var(--accent); transform: translateX(4px); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(247,244,239,0.4);
  letter-spacing: 0.06em;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.btn-ink {
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
  padding: 14px 28px;
  border-radius: 2px;
}
.btn-ink:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,57,10,0.2); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  font-size: 0.72rem;
  padding: 13px 27px;
  border: 1px solid var(--ink);
  border-radius: 2px;
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.btn-accent {
  background: var(--accent);
  color: var(--paper);
  font-size: 0.72rem;
  padding: 14px 28px;
  border-radius: 2px;
}
.btn-accent:hover { background: #a82e07; transform: translateY(-2px); }

/* ---- PAGE TRANSITIONS ---- */
.page-enter {
  animation: pageIn 0.5s var(--ease) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- REVEAL ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---- RULE / DIVIDER ---- */
.hr-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---- EDITORIAL LABEL ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 860px) {
  .desktop-nav { display: none; }
  .hamburger   { display: flex; }
  .section     { padding: 72px 0; }
}

@media (max-width: 600px) {
  .section { padding: 56px 0; }
  .footer-grid { 
    grid-template-columns: 1fr; 
    gap: 40px; 
    text-align: center; 
  }
  .footer-links { align-items: center; }
  .footer-links a:hover { transform: translateY(-2px); }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
