/* ================================================================
   HAUWA LAWAL — Personal Site
   Black & gold. Arabic geometric. Editorial.
   ================================================================ */

/* ── Custom Properties ───────────────────────────────────────── */
:root {
  --black:      #080808;
  --charcoal:   #111111;
  --surface:    #1C1C1C;
  --cream:      #F2EDE4;
  --gold:       #C9A84C;
  --gold-line:  rgba(201, 168, 76, 0.2);
  /* 0.62 opacity → ~7:1 contrast on --black. Was 0.48 (failing ~3.4:1). */
  --muted:      rgba(242, 237, 228, 0.62);

  --font-display: 'Cormorant Garamond', serif;
  --font-body:    'DM Sans', sans-serif;

  --max-w:  1160px;
  --pad-x:  80px;
  --pad-y:  120px;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--black);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Accessibility: skip link ────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 24px;
  z-index: 9999;
  background: var(--gold);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 12px 20px;
  text-transform: uppercase;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* ── Accessibility: screen-reader-only text ─────────────────── */
.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;
}

/* ── Accessibility: focus styles ────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ── Scroll fade-in ──────────────────────────────────────────── */
section {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
section.visible {
  opacity: 1;
  transform: none;
}
#hero {
  opacity: 1;
  transform: none;
}

/* ── Reduced motion: disable all animations ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  section {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .essay-card,
  .essay-card::before,
  .btn,
  nav,
  .card-link,
  .nav-hamburger span {
    transition: none;
  }
}

/* ── Gold rule divider ───────────────────────────────────────── */
.gold-rule {
  display: flex;
  align-items: center;
  padding: 0 var(--pad-x);
}
.gold-rule::before,
.gold-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold-line);
}
.gold-rule__ornament {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 28px;
  flex-shrink: 0;
}
.gold-rule__ornament::before,
.gold-rule__ornament::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  background: rgba(201, 168, 76, 0.35);
  transform: rotate(45deg);
}

/* ── Utility ─────────────────────────────────────────────────── */
.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.section-subline {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 36px;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-gold {
  background: var(--gold);
  color: var(--black);
  border: 1px solid var(--gold);
}
.btn-gold:hover {
  background: #B8962E;
  border-color: #B8962E;
}

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(242, 237, 228, 0.35);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.5);
}
.btn-outline-gold:hover {
  background: var(--gold);
  color: var(--black);
}

/* ── Navigation ──────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 28px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s ease, padding 0.35s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 18px var(--pad-x);
  border-bottom-color: var(--gold-line);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.07em;
  z-index: 101;
}

.nav-links {
  display: flex;
  gap: 44px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(242, 237, 228, 0.65);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--gold); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  z-index: 101;
  /* Ensure minimum 44×44px touch target */
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-hamburger span {
  display: block;
  height: 1px;
  background: var(--cream);
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  pointer-events: none;
}
.nav-hamburger span:nth-child(1) { width: 26px; }
.nav-hamburger span:nth-child(2) { width: 17px; }
.nav-hamburger span:nth-child(3) { width: 26px; }

nav.menu-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  width: 26px;
}
nav.menu-open .nav-hamburger span:nth-child(2) { opacity: 0; }
nav.menu-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  width: 26px;
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 44px;
}
.nav-overlay.open { display: flex; }
.nav-overlay a {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
  /* Generous touch targets */
  padding: 4px 0;
}
.nav-overlay a:hover { color: var(--gold); }

/* ── Hero ────────────────────────────────────────────────────── */
#hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 8, 8, 0.08) 0%,
    rgba(8, 8, 8, 0.04) 30%,
    rgba(8, 8, 8, 0.50) 68%,
    rgba(8, 8, 8, 0.92) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 var(--pad-x) 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
  display: block;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: 84px;
  font-weight: 400;
  font-style: italic;
  color: var(--cream);
  line-height: 1.0;
  letter-spacing: 0.015em;
  margin-bottom: 22px;
  max-width: 780px;
}

.hero-subline {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(242, 237, 228, 0.62);
  margin-bottom: 44px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Thin gold line at hero bottom */
.hero-foot {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--gold) 30%,
    var(--gold) 70%,
    transparent 100%
  );
  opacity: 0.3;
  z-index: 3;
}

/* ── About ───────────────────────────────────────────────────── */
#about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "photo text";
  min-height: 85vh;
  background: var(--charcoal);
}

.about-photo {
  grid-area: photo;
  overflow: hidden;
  position: relative;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-text {
  grid-area: text;
  padding: var(--pad-y) var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 400;
  color: var(--cream);
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 36px;
}

.about-text p {
  font-size: 16px;
  color: rgba(242, 237, 228, 0.78);
  line-height: 1.9;
  margin-bottom: 20px;
}
.about-text p:last-of-type { margin-bottom: 0; }
.about-text em { font-style: italic; color: var(--cream); }

/* ── Editorial break ─────────────────────────────────────────── */
.editorial-break {
  width: 100%;
  height: 72vh;
  min-height: 380px;
  overflow: hidden;
  position: relative;
}

.editorial-break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: center center;
}

/* Specific crop overrides, defined here not inline */
.editorial-break__img--high { object-position: center 18%; }
.editorial-break__img--mid  { object-position: center 25%; }

.editorial-break--sm {
  height: 52vh;
  min-height: 300px;
}

/* ── Writing ─────────────────────────────────────────────────── */
#writing {
  background: var(--black);
  padding: var(--pad-y) 0;
}

.writing-header {
  max-width: var(--max-w);
  margin: 0 auto 56px;
  padding: 0 var(--pad-x);
}

.writing-header h2 {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.essay-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--gold-line);
  gap: 1px;
  border: 1px solid var(--gold-line);
}

.essay-card {
  background: var(--charcoal);
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background 0.3s ease;
}
.essay-card:hover { background: var(--surface); }

.essay-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s ease;
}
.essay-card:hover::before { transform: scaleY(1); }

.essay-card h3 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 400;
  color: var(--cream);
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}

.essay-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-bottom: 32px;
}

.card-link {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  transition: letter-spacing 0.25s ease;
  /* Enough vertical space for 44px touch target with card padding */
}
.card-link:hover { letter-spacing: 0.26em; }

.writing-cta {
  max-width: var(--max-w);
  margin: 60px auto 0;
  padding: 0 var(--pad-x);
  text-align: center;
}

/* ── Screen ──────────────────────────────────────────────────── */
#screen {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.screen-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% center;
}

.screen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.70);
}

.screen-texture {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpolygon points='30,6 33.7,20.3 48,20.3 36.5,29.1 40.2,43.4 30,35 19.8,43.4 23.5,29.1 12,20.3 26.3,20.3' fill='none' stroke='%23C9A84C' stroke-width='0.7' opacity='0.045'/%3E%3C/svg%3E");
  background-size: 60px 60px;
}

.screen-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: var(--pad-y) var(--pad-x);
}

#screen h2 {
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.02em;
  line-height: 1.08;
  margin-bottom: 28px;
}

#screen p {
  font-size: 16px;
  color: rgba(242, 237, 228, 0.78);
  line-height: 1.9;
  margin-bottom: 44px;
}
#screen em { font-style: italic; color: var(--cream); }

/* ── Comic ───────────────────────────────────────────────────── */
#comic {
  background: var(--charcoal);
  padding: var(--pad-y) 0;
}

.comic-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: center;
}

.comic-text h2 {
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.02em;
  line-height: 1.08;
  margin-bottom: 28px;
}

.comic-text p {
  font-size: 16px;
  color: rgba(242, 237, 228, 0.78);
  line-height: 1.9;
  margin-bottom: 20px;
}
.comic-text p:last-of-type { margin-bottom: 40px; }
.comic-text em { font-style: italic; color: var(--cream); }

.comic-cover {
  position: relative;
}

.comic-cover-inner {
  aspect-ratio: 3 / 4;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Replaces the inline style on the comic cover img */
.comic-cover-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.comic-cover-inner::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  pointer-events: none;
  z-index: 2;
}

.comic-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  z-index: 3;
}
.comic-corner--tl { top: 5px; left: 5px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.comic-corner--tr { top: 5px; right: 5px; border-top: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.comic-corner--bl { bottom: 5px; left: 5px; border-bottom: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.comic-corner--br { bottom: 5px; right: 5px; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }

/* ── Contact ─────────────────────────────────────────────────── */
#contact {
  background: var(--black);
  padding: 140px var(--pad-x) 60px;
  text-align: center;
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
}

#contact h2 {
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 400;
  font-style: italic;
  color: var(--cream);
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin-bottom: 14px;
}

#contact .section-subline {
  margin-bottom: 72px;
}

.contact-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin-bottom: 84px;
  text-align: left;
}

.contact-links li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
  transition: border-color 0.25s ease;
}
.contact-links li:first-child { border-top: 1px solid rgba(201, 168, 76, 0.1); }
.contact-links li:hover { border-bottom-color: rgba(201, 168, 76, 0.3); }

.link-arrow {
  font-size: 12px;
  color: var(--gold);
  flex-shrink: 0;
}

.link-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 96px;
  flex-shrink: 0;
}

.contact-links a {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
  /* Prevent long URLs from breaking layout */
  overflow-wrap: break-word;
  word-break: break-all;
  min-width: 0;
}
.contact-links a:hover { color: var(--gold); }

.contact-medallion {
  width: 96px;
  height: 96px;
  opacity: 0.28;
  margin: 0 auto 36px;
}

footer {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(242, 237, 228, 0.2);
  text-align: center;
  padding: 0 var(--pad-x) 48px;
}

/* ── Responsive — tablet ─────────────────────────────────────── */
@media (max-width: 1023px) {
  :root { --pad-x: 48px; }
  .essay-grid { grid-template-columns: 1fr 1fr; }
  .comic-grid { gap: 60px; }
  .hero-headline { font-size: 68px; }
}

/* ── Responsive — mobile ─────────────────────────────────────── */
@media (max-width: 767px) {
  :root {
    --pad-x: 24px;
    --pad-y: 80px;
  }

  nav { padding: 20px var(--pad-x); }
  nav.scrolled { padding: 14px var(--pad-x); }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero */
  .hero-headline { font-size: 44px; }
  .hero-content { padding: 0 var(--pad-x) 60px; }
  .hero-subline { font-size: 11px; letter-spacing: 0.1em; }

  /* About */
  #about {
    grid-template-columns: 1fr;
    grid-template-areas: "photo" "text";
  }
  .about-photo {
    height: 65vw;
    min-height: 300px;
  }
  .about-text { padding: 60px var(--pad-x); }
  .about-text h2 { font-size: 32px; }

  /* Editorial breaks */
  .editorial-break { height: 55vw; min-height: 260px; }
  .editorial-break--sm { height: 44vw; min-height: 220px; }

  /* Writing */
  .writing-header h2 { font-size: 38px; }
  .essay-grid { grid-template-columns: 1fr; }

  /* Screen */
  #screen h2 { font-size: 36px; }
  .screen-content { padding: 80px var(--pad-x); }

  /* Comic */
  .comic-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .comic-text { order: 1; }
  .comic-cover { order: 0; max-width: 260px; margin: 0 auto; }
  .comic-text h2 { font-size: 38px; }

  /* Contact */
  #contact { padding: 100px var(--pad-x) 48px; }
  #contact h2 { font-size: 40px; }
  .link-label { min-width: 72px; }
  /* Smaller type on contact links so URLs don't overflow */
  .contact-links a { font-size: 16px; }
  .contact-links li { gap: 12px; }

  .gold-rule { padding: 0 var(--pad-x); }
}

/* ── Responsive — small phones ───────────────────────────────── */
@media (max-width: 390px) {
  .hero-headline { font-size: 38px; }
  .contact-links a { font-size: 14px; }
  .link-label { display: none; }
}
