/* ============================================
   JLAW ENTERPRISE — Modern Editorial
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,400;1,9..144,500&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #0A0A0A;
  --paper: #F5F2EC;
  --paper-warm: #EFEAE0;
  --accent: #C4392B;
  --accent-deep: #8B2A1E;
  --gold: #B8935A;
  --muted: #6B6B6B;
  --hairline: rgba(10, 10, 10, 0.12);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--paper); }

/* ——— Grain overlay ——— */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* ——— Typography ——— */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.serif { font-family: var(--serif); }
.italic { font-style: italic; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow-accent { color: var(--accent); }

/* ——— Navigation ——— */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  mix-blend-mode: difference;
  color: #fff;
  transition: background 0.4s, padding 0.4s, mix-blend-mode 0s;
}

.nav.scrolled {
  mix-blend-mode: normal;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 40px;
  color: var(--paper);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: inherit;
}

.nav-logo em {
  font-style: italic;
  font-weight: 400;
}

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

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  transition: opacity 0.3s;
}

.nav-links a:hover { opacity: 0.6; }

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
}

/* ——— Mobile Menu Toggle ——— */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 201;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ——— Mobile Overlay Menu ——— */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  font-family: var(--serif);
  font-size: clamp(36px, 8vw, 56px);
  font-weight: 400;
  color: var(--paper);
  text-decoration: none;
  padding: 16px 0;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.3s;
}

.mobile-menu.open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open a:nth-child(1) { transition-delay: 0.1s, 0.1s, 0s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.15s, 0.15s, 0s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.2s, 0.2s, 0s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.2s, 0.2s, 0s; }

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--accent);
}

.mobile-menu a.active {
  font-style: italic;
}

/* ——— Scroll-to-top button ——— */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid rgba(245,242,236,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.4s, background 0.3s;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.scroll-top svg {
  width: 18px;
  height: 18px;
}

/* ——— Layout ——— */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

.section { padding: 120px 0; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 999px;
}

.btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn svg { width: 14px; height: 14px; transition: transform 0.4s; }
.btn:hover svg { transform: translateX(4px); }

/* ——— Footer ——— */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 100px 0 40px;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 80px;
  border-bottom: 1px solid rgba(245, 242, 236, 0.12);
}

.footer-brand h3 {
  font-size: clamp(48px, 5vw, 72px);
  margin-bottom: 20px;
}

.footer-brand p {
  color: rgba(245, 242, 236, 0.7);
  max-width: 380px;
  font-size: 15px;
  line-height: 1.7;
}

.footer-col h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.5);
  margin-bottom: 20px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.3s;
}
.footer-col a:hover { opacity: 0.6; }

.footer-bottom {
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(245, 242, 236, 0.5);
  letter-spacing: 0.05em;
}

/* ——— Reveal animations ——— */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.line-reveal {
  display: block;
  overflow: hidden;
}

.line-reveal > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.line-reveal.in > span {
  transform: translateY(0);
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .nav { padding: 18px 20px; }
  .nav.scrolled { padding: 14px 20px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 12px; }
  .container { padding: 0 20px; }
  .section { padding: 80px 0; }
  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
  .scroll-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}
