/* ============================================================
   M NEALE INCORPORATED — 2026 redesign
   Monochrome: obsidian / charcoal / silver / white
   ============================================================ */

:root {
  --black: #08080a;
  --ink: #0e0e11;
  --charcoal: #16161b;
  --steel: #232329;
  --line: rgba(255, 255, 255, 0.09);
  --gray: #8b8b95;
  --silver: #c8c8d2;
  --white: #f4f4f6;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--white); color: var(--black); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 40px; }

/* film grain */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none; z-index: 999; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ============ TYPE ============ */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; }
h2 { font-size: clamp(2.4rem, 4.6vw, 3.8rem); letter-spacing: -0.01em; }
h2 em, h1 em, blockquote em { font-style: italic; color: var(--silver); }

.eyebrow {
  font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gray); font-weight: 500; margin-bottom: 22px;
  display: flex; align-items: center; gap: 14px;
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--gray); flex: none; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  padding: 17px 34px; cursor: pointer; border: 1px solid transparent;
  transition: all 0.45s var(--ease); position: relative; overflow: hidden;
}
.btn-solid { background: var(--white); color: var(--black); }
.btn-solid:hover { background: var(--silver); transform: translateY(-2px); box-shadow: 0 18px 40px -18px rgba(255,255,255,0.35); }
.btn-outline { border-color: rgba(255,255,255,0.25); color: var(--white); background: transparent; }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.06); }
.btn-ghost { color: var(--silver); padding-left: 0; padding-right: 0; border: none; }
.btn-ghost:hover { color: var(--white); }
.btn-ghost .arrow { transition: transform 0.35s var(--ease); }
.btn-ghost:hover .arrow { transform: translateX(6px); }
.btn-sm { padding: 12px 24px; font-size: 0.72rem; }
.btn-full { width: 100%; justify-content: center; }

/* ============ HEADER ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 26px 0;
  transition: padding 0.5s var(--ease), background 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
  animation: headerDrop 1s var(--ease) 0.2s both;
}
@keyframes headerDrop { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.site-header.scrolled {
  padding: 14px 0;
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.brand-logo { height: 44px; width: auto; display: block; transition: height 0.5s var(--ease); }
.site-header.scrolled .brand-logo { height: 36px; }

.main-nav { display: flex; gap: 38px; }
.nav-link {
  color: var(--gray); text-decoration: none; font-size: 0.8rem;
  letter-spacing: 0.18em; text-transform: uppercase; font-weight: 400;
  position: relative; padding: 4px 0; transition: color 0.3s ease;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--white); transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: 24px; }
.header-phone {
  color: var(--silver); text-decoration: none; font-size: 0.85rem; letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.header-phone:hover { color: var(--white); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 1.5px; background: var(--white); margin: 7px 0; transition: 0.3s; }

/* ============ HERO ============ */
.hero {
  min-height: 100vh; position: relative; display: flex; flex-direction: column;
  justify-content: center; overflow: hidden;
  background: radial-gradient(120% 90% at 75% 30%, #15151c 0%, var(--black) 58%);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-lines {
  position: absolute; inset: 0; opacity: 0.5;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: 12.5% 100%;
  mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
}
.hero-glow {
  position: absolute; top: 8%; right: -6%; width: 56vw; height: 56vw;
  max-width: 820px; max-height: 820px; border-radius: 50%;
  background: radial-gradient(circle, rgba(190,195,215,0.10) 0%, transparent 62%);
  animation: pulse 9s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.07); } }

.hero-inner {
  position: relative; z-index: 2;
  max-width: 1360px; margin: 0 auto; padding: 150px 40px 80px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center; gap: 40px; width: 100%;
}

.hero-title {
  font-size: clamp(3rem, 6.4vw, 5.6rem); letter-spacing: -0.015em; margin: 6px 0 30px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; transform: translateY(115%); animation: riseUp 1.1s var(--ease) forwards; }
.hero-title .line:nth-child(1) > span { animation-delay: 0.35s; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.5s; }
.hero-title .line:nth-child(3) > span { animation-delay: 0.65s; }
.line-accent { color: var(--silver); }
@keyframes riseUp { to { transform: translateY(0); } }

.reveal-line { overflow: hidden; display: block; }
.reveal-line > span { display: block; transform: translateY(110%); opacity: 0; animation: riseSoft 1s var(--ease) forwards; }
.hero-copy .eyebrow.reveal-line > span { animation-delay: 0.25s; display: flex; align-items: center; gap: 14px; }
.hero-sub.reveal-line > span { animation-delay: 0.85s; }
.hero-cta.reveal-line > span { animation-delay: 1s; }
.hero-stats.reveal-line > span { animation-delay: 1.2s; }
@keyframes riseSoft { to { transform: translateY(0); opacity: 1; } }

.hero-copy .eyebrow::before { display: none; }
.hero-copy .eyebrow span::before { content: ""; width: 36px; height: 1px; background: var(--gray); display: inline-block; vertical-align: middle; margin-right: 14px; }

.hero-sub { color: var(--gray); font-size: 1.06rem; max-width: 520px; margin-bottom: 40px; font-weight: 300; }

.hero-cta > span { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }

.hero-stats { margin-top: 60px; }
.stats-row { display: flex; align-items: center; gap: 36px; }
.stat strong {
  font-family: var(--serif); font-size: 2.5rem; font-weight: 500; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat sup { font-family: var(--serif); font-size: 1.3rem; color: var(--silver); }
.stat small { display: block; color: var(--gray); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 8px; }
.stat-divider { width: 1px; height: 52px; background: var(--line); }

/* hero visual */
.hero-visual { position: relative; height: min(72vh, 680px); min-height: 460px; }
#scaleCanvas { width: 100%; height: 100%; display: block; }
.visual-ring {
  position: absolute; top: 50%; left: 50%; width: 78%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line); border-radius: 50%;
  animation: ringSpin 40s linear infinite;
}
.visual-ring::before {
  content: ""; position: absolute; top: -3px; left: 50%; width: 5px; height: 5px;
  background: var(--silver); border-radius: 50%;
}
@keyframes ringSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.scroll-hint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 3; display: block; width: 1px; height: 64px; overflow: hidden;
}
.scroll-line {
  display: block; width: 1px; height: 100%; background: var(--gray);
  animation: scrollDrop 2.2s var(--ease) infinite;
}
@keyframes scrollDrop {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ============ MARQUEE ============ */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 26px 0; overflow: hidden; background: var(--ink);
}
.marquee-track {
  display: flex; align-items: center; gap: 44px; width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--serif); font-size: 1.35rem; font-style: italic;
  color: var(--silver); white-space: nowrap;
}
.marquee-track i { color: var(--steel); font-size: 0.55rem; font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ SECTIONS ============ */
.section { padding: 140px 0; position: relative; }
.section-head { margin-bottom: 70px; max-width: 720px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(44px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ SERVICES ============ */
.services { background: var(--black); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service-card {
  border: 1px solid var(--line); padding: 46px 38px 42px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 45%);
  position: relative; display: flex; flex-direction: column;
  transition: transform 0.55s var(--ease), border-color 0.55s ease, background 0.55s ease,
              opacity 1s var(--ease);
}
.service-card:hover { transform: translateY(-10px); border-color: rgba(255,255,255,0.28); background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 55%); }
.service-card.featured { border-color: rgba(255,255,255,0.22); }
.card-num {
  font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--gray);
  margin-bottom: 30px; position: relative; padding-bottom: 18px;
}
.card-num::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 1px; background: var(--gray); transition: width 0.5s var(--ease); }
.service-card:hover .card-num::after { width: 100%; }
.service-card h3 { font-size: 2rem; margin-bottom: 16px; }
.service-card > p { color: var(--gray); font-size: 0.95rem; margin-bottom: 28px; }
.service-card ul { list-style: none; margin-bottom: 34px; flex: 1; }
.service-card li {
  color: var(--silver); font-size: 0.88rem; padding: 9px 0 9px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.05); position: relative;
}
.service-card li::before { content: "—"; position: absolute; left: 0; color: var(--gray); }
.card-link {
  color: var(--white); text-decoration: none; font-size: 0.78rem;
  letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.card-link .arrow { transition: transform 0.35s var(--ease); }
.card-link:hover .arrow { transform: translateX(6px); }

/* ============ PHILOSOPHY ============ */
.philosophy { background: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.philosophy-inner { max-width: 900px; margin: 0 auto 100px; text-align: center; position: relative; }
.quote-mark {
  font-family: var(--serif); font-size: 9rem; line-height: 0.6; color: var(--steel);
  margin-bottom: 34px;
}
.philosophy blockquote {
  font-family: var(--serif); font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.35; font-weight: 400;
}
.philosophy-meta {
  margin-top: 40px; display: flex; align-items: center; justify-content: center; gap: 16px;
  color: var(--gray); font-size: 0.74rem; letter-spacing: 0.26em; text-transform: uppercase;
}
.meta-rule { width: 44px; height: 1px; background: var(--gray); }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; max-width: 1060px; margin: 0 auto; }
.pillar { border-top: 1px solid var(--line); padding-top: 30px; }
.pillar-num { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--gray); display: block; margin-bottom: 14px; }
.pillar h4 { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; margin-bottom: 10px; }
.pillar p { color: var(--gray); font-size: 0.92rem; }

/* ============ TEAM ============ */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.team-card {
  border: 1px solid var(--line); padding: 50px 44px;
  display: flex; gap: 36px; align-items: flex-start;
  background: linear-gradient(135deg, rgba(255,255,255,0.025), transparent 50%);
  transition: transform 0.55s var(--ease), border-color 0.55s ease, opacity 1s var(--ease);
}
.team-card:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.28); }
.team-portrait {
  position: relative; flex: none; width: 108px; height: 108px; border-radius: 50%;
  background: var(--charcoal); display: flex; align-items: center; justify-content: center;
}
.team-portrait span { font-family: var(--serif); font-size: 2rem; font-style: italic; color: var(--silver); }
.portrait-ring {
  position: absolute; inset: -7px; border-radius: 50%;
  border: 1px solid var(--line); border-top-color: var(--silver);
  animation: ringSpinSm 9s linear infinite;
}
@keyframes ringSpinSm { to { transform: rotate(360deg); } }
.team-info h3 { font-size: 1.8rem; }
.team-role { color: var(--gray); font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; margin: 6px 0 16px; }
.team-bio { color: var(--silver); font-size: 0.94rem; margin-bottom: 18px; }

/* ============ CONTACT ============ */
.contact { background: radial-gradient(90% 100% at 20% 0%, #14141a 0%, var(--black) 60%); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 90px; align-items: start; }
.contact-sub { color: var(--gray); margin: 22px 0 46px; max-width: 380px; }
.contact-details { display: flex; flex-direction: column; gap: 28px; }
.detail small { display: block; color: var(--gray); font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; margin-bottom: 6px; }
.detail a, .detail span { color: var(--white); text-decoration: none; font-size: 1.25rem; font-family: var(--serif); }
.detail a:hover { color: var(--silver); }

.contact-form {
  border: 1px solid var(--line); padding: 52px 46px;
  background: rgba(255,255,255,0.02); backdrop-filter: blur(8px);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: block; margin-bottom: 22px; }
.field span { display: block; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gray); margin-bottom: 10px; }
.field input, .field select, .field textarea {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.18);
  color: var(--white); font-family: var(--sans); font-size: 0.98rem; font-weight: 300;
  padding: 10px 2px; outline: none; transition: border-color 0.3s ease; resize: vertical;
}
.field select { cursor: pointer; }
.field select option { background: var(--charcoal); }
.field input::placeholder, .field textarea::placeholder { color: #55555e; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--white); }
.contact-form .btn { margin-top: 12px; }
.form-note { color: var(--gray); font-size: 0.76rem; text-align: center; margin-top: 18px; letter-spacing: 0.04em; }
.contact-form.sent { text-align: center; }
.contact-form .sent-msg { font-family: var(--serif); font-size: 1.6rem; padding: 60px 0; }

/* ============ FOOTER ============ */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 44px; background: var(--ink); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 30px; text-align: center; }
.footer-logo { height: 40px; opacity: 0.9; }
.footer-nav { display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: var(--gray); text-decoration: none; font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase; }
.footer-nav a:hover { color: var(--white); }
.footer-legal { color: #55555e; font-size: 0.78rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 130px; text-align: left; }
  .hero-visual { height: 46vh; min-height: 360px; order: -1; margin-top: 20px; }
  .service-grid, .pillars { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 60px; }
  .header-phone { display: none; }
}
@media (max-width: 760px) {
  .container, .header-inner, .hero-inner { padding-left: 24px; padding-right: 24px; }
  .main-nav {
    position: fixed; inset: 0; background: rgba(8,8,10,0.96); backdrop-filter: blur(20px);
    flex-direction: column; align-items: center; justify-content: center; gap: 34px;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease; z-index: 90;
  }
  .main-nav.open { opacity: 1; pointer-events: auto; }
  .main-nav .nav-link { font-size: 1.1rem; }
  .nav-toggle { display: block; position: relative; z-index: 95; }
  .header-actions .btn { display: none; }
  .section { padding: 90px 0; }
  .stats-row { gap: 22px; }
  .stat strong { font-size: 1.9rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .team-card { flex-direction: column; }
  .contact-form { padding: 36px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
