/* ═══════════════════════════════════════════════════════
   MARK LYNN DESIGN — styles.css
   Complete replacement file. Drop in and push.
   ═══════════════════════════════════════════════════════ */

/* ═══ RESET & VARIABLES ═══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cream: #F7F5F0;
  --warm-white: #FDFCFA;
  --charcoal: #1A1A18;
  --stone: #8C8579;
  --warm-gray: #8C8579;
  --stone-light: #B8B0A4;
  --gold: #C4A265;
  --gold-muted: #D4BC8A;
  --ink: #2C2A26;
  --rule: rgba(140, 133, 121, 0.25);
  --rule-color: rgba(140, 133, 121, 0.25);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Libre Franklin', 'Helvetica Neue', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Libre Franklin', 'Helvetica Neue', sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--warm-white);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ═══ NAVIGATION ═══ */
nav, #mainNav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

nav.scrolled, #mainNav.scrolled {
  background: rgba(253, 252, 250, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 3rem;
  box-shadow: 0 1px 0 var(--rule);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--charcoal);
  text-transform: uppercase;
  text-decoration: none;
}

.nav-logo span {
  font-weight: 300;
  color: var(--stone);
  margin-left: 0.3em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover { color: var(--charcoal); }
.nav-links a:hover::after { width: 100%; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--charcoal);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

/* ═══ HERO ═══ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 6rem;
  position: relative;
  background: var(--cream);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(135deg, rgba(247, 245, 240, 0.3) 0%, transparent 60%),
    linear-gradient(to bottom, transparent 40%, rgba(247, 245, 240, 0.85) 100%);
  z-index: 1;
}

.hero-bg-pattern {
  position: absolute;
  inset: -5%;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg-pattern svg {
  position: absolute;
  top: 50%;
  left: 72%;
  width: 126%;
  height: 126%;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center center;
  opacity: 0.22;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-eyebrow::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.hero h1 em, .hero h1 i {
  font-style: italic;
  font-weight: 300;
  color: var(--stone);
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--stone);
  max-width: 520px;
  letter-spacing: 0.01em;
}

/* Hero stats (if inside hero) */
.hero-stat-bar {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
}

.hero-stat .number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1;
}

.hero-stat .label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--stone-light);
  margin-top: 0.5rem;
}

/* Scroll indicator */
.scroll-line {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.scroll-line span {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone-light);
  writing-mode: vertical-rl;
}

.scroll-line::after {
  content: '';
  width: 1px;
  height: 40px;
  background: var(--stone-light);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ═══ STATS BAND ═══ */
.stats-band {
  background: #1F1B14;
  border-top: none;
  border-bottom: none;
}

.stats-band-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 0 2rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: #EDE5D8;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7A7060;
  margin-top: 0.5rem;
}

.stat-divider {
  width: 1px;
  height: 50px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

/* ═══ SECTION DEFAULTS ═══ */
section {
  padding: 6rem 3rem;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--gold);
}

/* ═══ ABOUT ═══ */
.about, #about {
  background: var(--warm-white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 6rem 3rem;
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--charcoal);
  margin-bottom: 2rem;
}

.about-text h2 em, .about-text h2 i {
  font-style: italic;
  color: var(--stone);
}

.about-text p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--stone);
  margin-bottom: 1.5rem;
}

.about-portrait {
  position: relative;
  overflow: hidden;
}

.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-portrait::after {
  content: '';
  position: absolute;
  top: -1rem;
  right: -1rem;
  width: 100%;
  height: 100%;
  border: 1px solid var(--rule);
  z-index: -1;
  pointer-events: none;
}

/* ═══ PORTFOLIO ═══ */
.portfolio, #portfolio {
  background: var(--charcoal);
  padding: 6rem 3rem;
}

.portfolio .section-label {
  color: var(--gold-muted);
}

.portfolio .section-label::before {
  background: var(--gold-muted);
}

.portfolio-header {
  max-width: 1400px;
  margin: 0 auto 4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.portfolio-header h2, .portfolio h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  color: var(--cream);
}

.portfolio-header h2 em, .portfolio h2 em,
.portfolio-header h2 i, .portfolio h2 i {
  font-style: italic;
  color: var(--stone);
}

.portfolio-cta {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-muted);
  padding-bottom: 4px;
  transition: all 0.3s;
}

.portfolio-cta:hover {
  color: var(--cream);
  border-color: var(--cream);
}

.portfolio-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.portfolio-item {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  background: #2C2A26;
  border-radius: 2px;
}

.portfolio-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

.portfolio-item img, .portfolio-item .item-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-item:hover img, .portfolio-item:hover .item-bg {
  transform: scale(1.05);
}

.portfolio-item .item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(26, 26, 24, 0.9) 0%, transparent 100%);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-item:hover .item-overlay {
  transform: translateY(0);
  opacity: 1;
}

.item-overlay .item-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 0.3rem;
}

.item-overlay .item-detail {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone-light);
}

/* ═══ APPROACH ═══ */
.approach, #approach {
  background: var(--warm-white);
  max-width: 1400px;
  margin: 0 auto;
  padding: 6rem 3rem;
}

.approach h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  color: var(--charcoal);
  margin-bottom: 4rem;
  max-width: 600px;
}

.approach h2 em, .approach h2 i {
  font-style: italic;
  color: var(--stone);
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.approach-item {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.approach-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--stone-light);
  margin-bottom: 1.5rem;
  line-height: 1;
}

.approach-item h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.approach-item p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--stone);
}

/* ═══ LEGACY QUOTE ═══ */
.legacy {
  background: var(--cream);
  padding: 6rem 3rem;
  text-align: center;
}

.legacy-inner {
  max-width: 800px;
  margin: 0 auto;
}
.legacy-inner .section-label { justify-content: center; }

.legacy-quote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: var(--charcoal);
  margin-bottom: 2rem;
}

.legacy-attr {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--stone-light);
}

.legacy-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 2rem auto 0;
}

/* ═══ SERVICES ═══ */
.services, #services {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6rem 3rem;
  background: var(--warm-white);
}

.services h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  color: var(--charcoal);
  margin-bottom: 4rem;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.service-item {
  padding: 2.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  transition: background 0.4s;
}

.service-item:hover {
  background: rgba(247, 245, 240, 0.5);
}

.service-item:nth-child(odd) {
  border-right: 1px solid var(--rule);
}

.service-item:nth-last-child(-n+2) {
  border-bottom: 1px solid var(--rule);
}

.service-icon {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--gold);
  flex-shrink: 0;
  width: 40px;
}

.service-item h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 0.6rem;
}

.service-item p {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--stone);
}

/* ═══ CONTACT ═══ */
.contact-wrap { background: var(--charcoal); }
.contact, #contact {
  background: var(--charcoal);
  padding: 6rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.contact-left h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  color: var(--cream);
  margin-bottom: 2rem;
}

.contact-left h2 em, .contact-left h2 i {
  font-style: italic;
  color: var(--stone);
}

.contact-left p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--stone);
  margin-bottom: 3rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-detail-item .detail-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone);
}

.contact-detail-item .detail-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--cream);
}

.contact-detail-item a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  transition: border-color 0.3s;
}

.contact-detail-item a:hover {
  border-color: var(--gold);
}

/* Email CTA button */
.contact a[href^="mailto"] {
  color: var(--gold-muted);
  text-decoration: none;
}

.contact .cta-button, .contact a.btn {
  display: inline-block;
  border: 1px solid var(--gold-muted);
  padding: 1rem 3rem;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-muted);
  text-decoration: none;
  transition: all 0.4s;
  margin-top: 1rem;
}

.contact .cta-button:hover, .contact a.btn:hover {
  background: var(--gold-muted);
  color: var(--charcoal);
}

/* ═══ FOOTER ═══ */
footer {
  background: var(--ink);
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
}

.footer-brand span {
  font-weight: 300;
  color: rgba(140,133,121,0.5);
}

.footer-legal {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: rgba(140,133,121,0.5);
}

/* ═══ ANIMATIONS ═══ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-eyebrow { animation: fadeUp 0.8s 0.2s both; }
.hero h1 { animation: fadeUp 0.8s 0.4s both; }
.hero-sub { animation: fadeUp 0.8s 0.6s both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ RESPONSIVE: TABLET ═══ */
@media (max-width: 1024px) {
  .hero {
    padding: 120px 2rem 4rem;
  }
  .hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }
  .hero-stat-bar {
    flex-wrap: wrap;
    gap: 2rem;
  }
  .about, #about {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 5rem 2rem;
  }
  .about-portrait {
    max-width: 420px;
    margin: 0 auto;
  }
  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
  }
  .portfolio-item:first-child {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16/9;
  }
  .approach-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .services-list {
    grid-template-columns: 1fr;
  }
  .service-item:nth-child(odd) {
    border-right: none;
  }
  .contact, #contact {
    padding: 5rem 2rem;
  }
}

/* ═══ RESPONSIVE: MOBILE ═══ */
@media (max-width: 768px) {
  nav, #mainNav {
    padding: 1rem 1.5rem;
  }
  nav.scrolled, #mainNav.scrolled {
    padding: 0.8rem 1.5rem;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--warm-white);
    padding: 6rem 2.5rem 3rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.08);
    z-index: 100;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
  }
  section {
    padding: 4rem 1.5rem;
  }
  .hero {
    padding: 100px 1.5rem 3rem;
    min-height: auto;
  }
  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .hero-sub {
    font-size: 0.9rem;
    max-width: 100%;
  }
  .hero-stat-bar {
    flex-direction: column;
    gap: 1rem;
  }
  .scroll-line {
    display: none;
  }
  /* Stats band mobile */
  .stats-band-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }
  .stat-divider {
    display: none;
  }
  .stat-number {
    font-size: 2.2rem;
  }
  .stat-item {
    text-align: center;
    padding: 0.5rem 0;
  }
  /* About mobile */
  .about, #about {
    padding: 4rem 1.5rem;
  }
  /* Portfolio mobile */
  .portfolio, #portfolio {
    padding: 4rem 1.5rem;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-item:first-child {
    grid-column: span 1;
  }
  .portfolio-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  /* Approach mobile */
  .approach, #approach {
    padding: 4rem 1.5rem;
  }
  /* Services mobile */
  .services, #services {
    padding: 4rem 1.5rem;
  }
  /* Contact mobile */
  .contact, #contact {
    padding: 4rem 1.5rem;
  }
  /* Footer mobile */
  footer {
    padding: 2rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
