/* ═══════════════════════════════════════════════════════════════
   Law Prestige — DamPhi Template
   Dark prestigious. Cormorant serif. Gold accents.
   Ideal: Law firms, financial advisors, consultants, notaries
   ═══════════════════════════════════════════════════════════════ */


/* ── Design Tokens ── */
:root {
  /* Palette: Midnight Prestige */
  --bg: #05080F;
  --bg-surface: #0A0E18;
  --bg-card: #12182A;
  --primary: #C9A84C;
  --accent: #A8B8D0;
  --text: #EFEADE;
  --text-sub: #A8B0C4;
  --text-muted: #4A5270;
  --border: #1A2240;
  --border-hi: #2A345A;

  /* Typography System */
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Lato', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing & Layout */
  --nav-h:       72px;
  --section-pad: 7rem;
  --container:   1200px;
  --radius: 2px;
  --radius-lg: 4px;
  --transition:  .3s ease;
}

/* ── Reset ── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;font-size:16px;-webkit-font-smoothing:antialiased}
body{font-family:var(--font-body);background:var(--bg);color:var(--text);line-height:1.7;overflow-x:hidden;padding-top:var(--nav-h)}
a{text-decoration:none;color:inherit;transition:color var(--transition)}
img{max-width:100%;height:auto;display:block}
::selection{background:var(--primary);color:var(--bg)}
::-webkit-scrollbar{width:4px}
::-webkit-scrollbar-track{background:var(--bg)}
::-webkit-scrollbar-thumb{background:var(--border-hi);border-radius:2px}

/* ── Typography ── */
h1,h2,h3,h4{font-family:var(--font-display);font-weight:400;line-height:1.1;letter-spacing:-0.01em}
h1{font-size:clamp(2.8rem,5vw,5rem);font-style:italic}
h2{font-size:clamp(2rem,3.5vw,3.2rem)}
h3{font-size:1.4rem}
p{color:var(--text-sub);line-height:1.75}
.mono{font-family:var(--font-mono);font-size:0.72rem;letter-spacing:0.12em;text-transform:uppercase}

/* ── Layout ── */
.container{max-width:1180px;margin:0 auto;padding:0 2.5rem}
.section{padding:7rem 0}
.section-eyebrow{font-family:var(--font-mono);font-size:0.62rem;letter-spacing:0.25em;text-transform:uppercase;color:var(--primary);margin-bottom:1.25rem;display:flex;align-items:center;gap:0.75rem}
.section-eyebrow::before{content:'';width:32px;height:1px;background:var(--primary)}
.section-title{font-size:clamp(2rem,3.5vw,3rem);margin-bottom:1.5rem}
.section-sub{font-size:1rem;color:var(--text-sub);max-width:520px;line-height:1.8}

/* ── Navigation ── */
.nav{position:fixed;top:0;left:0;right:0;z-index:500;height:var(--nav-h);display:flex;align-items:center;justify-content:space-between;padding:0 3rem;background:rgba(10,8,7,0.92);backdrop-filter:blur(16px);border-bottom:1px solid var(--border);transition:background var(--transition)}
.nav-logo{font-family:var(--font-display);font-size:1.3rem;font-weight:600;letter-spacing:0.05em;color:var(--primary)}
.nav-links{display:flex;align-items:center;gap:2.5rem}
.nav-link{font-size:0.8rem;font-weight:500;color:var(--text-sub);letter-spacing:0.06em;text-transform:uppercase;transition:color var(--transition)}
.nav-link:hover,.nav-link.active{color:var(--primary)}
.nav-cta{padding:0.55rem 1.5rem;border:1px solid var(--primary);color:var(--primary);font-family:var(--font-display);font-style:italic;font-size:0.95rem;transition:all var(--transition)}
.nav-cta:hover{background:var(--primary);color:var(--bg)}
.nav-hamburger{display:none;flex-direction:column;gap:5px;background:transparent;border:none;cursor:pointer;padding:4px}
.nav-hamburger span{width:22px;height:1px;background:var(--text);display:block;transition:all 0.3s}

/* ── Hero ── */
.hero{min-height:calc(100vh - var(--nav-h)); min-height: calc(100svh - var(--nav-h));display:flex;align-items:center;position:relative;overflow:hidden;background:var(--bg)}
.hero::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 70% 50%,rgba(201,168,76,0.06) 0%,transparent 65%);pointer-events:none}
.hero-grid{display:grid;grid-template-columns:1fr 1fr;gap:5rem;align-items:center}
.hero-eyebrow{font-family:var(--font-mono);font-size:0.62rem;letter-spacing:0.25em;color:var(--primary);text-transform:uppercase;margin-bottom:1.75rem;display:flex;align-items:center;gap:0.75rem}
.hero-eyebrow::before{content:'';width:40px;height:1px;background:var(--primary)}
.hero h1{margin-bottom:1.5rem;color:var(--text)}
.hero-sub{font-size:1.05rem;color:var(--text-sub);line-height:1.8;margin-bottom:2.5rem;max-width:480px}
.hero-cta-group{display:flex;align-items:center;gap:1.5rem;flex-wrap:wrap}
.hero-stat-panel{background:var(--bg-surface);border:1px solid var(--border);padding:3rem;display:flex;flex-direction:column;gap:2rem}
.hero-stat{display:flex;flex-direction:column;gap:0.35rem;padding-bottom:2rem;border-bottom:1px solid var(--border)}
.hero-stat:last-child{padding-bottom:0;border-bottom:none}
.hero-stat-num{font-family:var(--font-display);font-size:2.5rem;font-weight:600;color:var(--primary);line-height:1}
.hero-stat-label{font-family:var(--font-mono);font-size:0.6rem;letter-spacing:0.15em;text-transform:uppercase;color:var(--text-muted)}

/* ── Buttons ── */
.btn{display:inline-block;padding:0.875rem 2rem;font-family:var(--font-display);font-style:italic;font-size:1rem;cursor:pointer;transition:all var(--transition);border-radius:var(--radius);border:1px solid}
.btn-primary{background:var(--primary);border-color:var(--primary);color:var(--bg)}
.btn-primary:hover{background:transparent;color:var(--primary)}
.btn-ghost{background:transparent;border-color:var(--border-hi);color:var(--text-sub)}
.btn-ghost:hover{border-color:var(--primary);color:var(--primary)}

/* ── Gold divider line ── */
.gold-line{width:60px;height:1px;background:var(--primary);margin:2rem 0}
.gold-line.center{margin-left:auto;margin-right:auto}

/* ── Services ── */
.services-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1px;background:var(--border);border:1px solid var(--border);margin-top:3rem}
.service-item{background:var(--bg-surface);padding:3rem;position:relative;overflow:hidden;transition:background var(--transition)}
.service-item:hover{background:var(--bg-card)}
.service-item::before{content:'';position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--primary);transform:scaleY(0);transition:transform var(--transition);transform-origin:bottom}
.service-item:hover::before{transform:scaleY(1)}
.service-num{font-family:var(--font-mono);font-size:0.6rem;color:var(--primary);letter-spacing:0.15em;margin-bottom:1.25rem}
.service-name{font-family:var(--font-display);font-size:1.4rem;font-weight:400;color:var(--text);margin-bottom:0.75rem}
.service-desc{font-size:0.88rem;color:var(--text-sub);line-height:1.7}

/* ── About ── */
.about-grid{display:grid;grid-template-columns:1fr 1fr;gap:6rem;align-items:center}
.about-image-wrap{position:relative}
.about-image-placeholder{width:100%;padding-bottom:120%;background:var(--bg-surface);border:1px solid var(--border);position:relative;display:flex;align-items:center;justify-content:center}
.about-image-label{font-family:var(--font-display);font-size:1.2rem;font-style:italic;color:var(--text-muted)}
.about-gold-frame{position:absolute;top:-20px;left:-20px;right:20px;bottom:20px;border:1px solid rgba(201,168,76,0.3);pointer-events:none}
.about-values{display:flex;flex-direction:column;gap:1.5rem;margin-top:2rem}
.about-value{display:flex;gap:1.25rem;align-items:flex-start}
.about-value-icon{width:36px;height:36px;border:1px solid var(--primary);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-family:var(--font-display);font-style:italic;color:var(--primary);font-size:0.9rem}
.about-value-text h4{font-family:var(--font-display);font-size:1rem;font-weight:600;color:var(--text);margin-bottom:0.3rem}
.about-value-text p{font-size:0.85rem;color:var(--text-sub);line-height:1.6}

/* ── Testimonials ── */
.testimonials{background:var(--bg-surface);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.testimonial-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem;margin-top:3rem}
.testimonial-card{border:1px solid var(--border);padding:2.5rem;position:relative}
.testimonial-card::before{content:'\201C';font-family:var(--font-display);font-size:5rem;color:var(--primary);opacity:0.3;position:absolute;top:1rem;left:1.5rem;line-height:1}
.testimonial-text{font-family:var(--font-display);font-style:italic;font-size:1.05rem;color:var(--text);line-height:1.6;margin-bottom:1.5rem;position:relative}
.testimonial-author{font-family:var(--font-mono);font-size:0.6rem;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted)}
.testimonial-role{color:var(--primary)}

/* ── Contact ── */
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:5rem}
.contact-info{display:flex;flex-direction:column;gap:2.5rem}
.contact-detail{display:flex;flex-direction:column;gap:0.35rem;border-bottom:1px solid var(--border);padding-bottom:2rem}
.contact-detail-label{font-family:var(--font-mono);font-size:0.58rem;letter-spacing:0.18em;text-transform:uppercase;color:var(--text-muted)}
.contact-detail-value{font-family:var(--font-display);font-size:1.1rem;color:var(--text)}
.contact-form{display:flex;flex-direction:column;gap:1.25rem}
.form-group{display:flex;flex-direction:column;gap:0.4rem}
.form-label{font-family:var(--font-mono);font-size:0.6rem;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted)}
.form-input,.form-textarea,.form-select{background:transparent;border:none;border-bottom:1px solid var(--border);padding:0.75rem 0;color:var(--text);font-family:var(--font-body);font-size:0.95rem;outline:none;transition:border-color var(--transition);width:100%}
.form-input:focus,.form-textarea:focus,.form-select:focus{border-bottom-color:var(--primary)}
.form-textarea{resize:vertical;min-height:120px}
.form-input::placeholder,.form-textarea::placeholder{color:var(--text-muted)}
.form-submit{margin-top:0.5rem;align-self:flex-start}

/* ── Footer ── */
.footer{background:var(--bg-surface);border-top:1px solid var(--border);padding:4rem 0 2rem}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:3rem;margin-bottom:3rem;padding-bottom:3rem;border-bottom:1px solid var(--border)}
.footer-brand-name{font-family:var(--font-display);font-size:1.4rem;font-weight:600;color:var(--primary);letter-spacing:0.05em;margin-bottom:0.75rem}
.footer-brand-tagline{font-family:var(--font-display);font-style:italic;font-size:0.95rem;color:var(--text-sub)}
.footer-col-title{font-family:var(--font-mono);font-size:0.6rem;letter-spacing:0.15em;text-transform:uppercase;color:var(--text-muted);margin-bottom:1.25rem}
.footer-links{list-style:none;display:flex;flex-direction:column;gap:0.6rem}
.footer-links a{font-size:0.88rem;color:var(--text-sub);transition:color var(--transition)}
.footer-links a:hover{color:var(--primary)}
.footer-bottom{display:flex;justify-content:space-between;align-items:center;font-family:var(--font-mono);font-size:0.62rem;color:var(--text-muted);letter-spacing:0.08em}

/* ── Cookie Banner ── */
.cookie-banner{position:fixed;bottom:0;left:0;right:0;z-index:9000;background:var(--bg-surface);border-top:1px solid var(--border);padding:1.25rem 2.5rem;transform:translateY(100%);transition:transform 0.4s ease}
.cookie-banner.show{transform:translateY(0)}
.cookie-inner{max-width:1180px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:2rem}
.cookie-text{font-size:0.82rem;color:var(--text-sub)}
.cookie-text a{color:var(--primary)}
.cookie-actions{display:flex;gap:0.75rem;flex-shrink:0}
.cookie-btn{padding:0.45rem 1.1rem;font-family:var(--font-body);font-size:0.78rem;cursor:pointer;border-radius:var(--radius);transition:all 0.2s}
.cookie-accept{background:var(--primary);color:var(--bg);border:1px solid var(--primary)}
.cookie-decline{background:transparent;color:var(--text-sub);border:1px solid var(--border)}
.cookie-decline:hover{border-color:var(--text-sub)}

/* ── 404 ── */
.error-page{min-height:calc(100vh - var(--nav-h)); min-height: calc(100svh - var(--nav-h));display:flex;align-items:center;justify-content:center;text-align:center}
.error-num{font-family:var(--font-display);font-size:clamp(6rem,15vw,12rem);font-weight:600;color:var(--primary);line-height:1;opacity:0.4}

/* ── Animations ── */
@keyframes fadeUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
.fade-up{animation:fadeUp 0.7s ease both}
.fade-up-2{animation:fadeUp 0.7s ease 0.15s both}
.fade-up-3{animation:fadeUp 0.7s ease 0.3s both}

/* ── Mobile ── */
.mobile-menu{display:none;position:fixed;inset:0;z-index:490;background:var(--bg);flex-direction:column;align-items:center;justify-content:center;gap:2.5rem}
.mobile-menu.open{display:flex}
.mobile-menu .nav-link{font-family:var(--font-display);font-size:2rem;font-weight:400;font-style:italic;color:var(--text)}

@media(max-width:1024px){
  .hero-grid,.about-grid,.contact-grid{grid-template-columns:1fr;gap:3rem}
  .services-grid{grid-template-columns:1fr}
  .testimonial-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr;gap:2rem}
  .hero-stat-panel{display:grid;grid-template-columns:repeat(3,1fr)}
  .hero-stat{padding-bottom:0;border-bottom:none;border-right:1px solid var(--border);padding-right:2rem}
  .hero-stat:last-child{border-right:none}
}
@media(max-width:768px){
  .nav{padding:0 1.5rem}
  .nav-links{display:none}
  .nav-hamburger{display:flex}
  .container{padding:0 1.5rem}
  .section{padding:5rem 0}
  .hero-stat-panel{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .cookie-inner{flex-direction:column;text-align:center}
  .cookie-actions{width:100%}
  .cookie-btn{flex:1;text-align:center}
}
@supports(padding:env(safe-area-inset-bottom)){
  .cookie-banner{padding-bottom:calc(1.25rem + env(safe-area-inset-bottom))}
}

/* [slot-system] painted image slots. HERO_IMAGE → .hero (section-bg; dark theme so a dark scrim
   over the photo keeps the already-light text legible; .container is lifted above the scrim and
   the .hero-stat-panel keeps its opaque --bg-surface). ABOUT_IMAGE → the .about-image-placeholder
   gold-frame tiles (label hidden on paint; the .about-gold-frame stays on top). CONTACT_IMAGE →
   band. Empty tokens keep the dark hero / name tile / pruned band — pixel-intact. */
.hero { background-size: cover; background-position: center; }
.hero.has-image::after { content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(5,8,15,.55) 0%, rgba(5,8,15,.72) 100%); }
.hero.has-image .container { position: relative; z-index: 1; }
.about-image-placeholder { background-size: cover; background-position: center; }
.about-image-placeholder.has-image .about-image-label { display: none; }
.contact-image { width: 100%; aspect-ratio: 16/6; background: var(--bg-surface);
  border: 1px solid var(--border); overflow: hidden; background-size: cover; background-position: center; }

/* ══ DAMPHI MOBILE BASELINE v1 — GENERATED, DO NOT HAND-EDIT ══
   Source: templates/_shared/mobile/mobile_baseline.css
   Regenerate: python3 Tools/apply_mobile_baseline.py law-prestige
   Edit the baseline, never this block. ══ */
@media (hover: none), (pointer: coarse) {
  .nav { backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    background: var(--bg) !important; }
}
/* ══ END DAMPHI MOBILE BASELINE ══ */

/* ══ [audit 20261016] template audit fixes — kept OUTSIDE the generated mobile-baseline block on purpose ══
   Mobile menu: the fixed nav (z-index 500) sits above the menu (490) and its hamburger covered the X, so the X
   moves just below the bar; the menu scrolls inside itself (short landscape screens) and stays clear of the
   cookie banner. The form's error toast wraps and stays 16px inside the screen. */
@media (max-width: 768px) {
  .mobile-menu #mobile-close { top: calc(var(--nav-h, 64px) + .5rem) !important; }
  .mobile-menu { overflow-y: auto; box-sizing: border-box; padding-bottom: var(--cookie-h, 0px); }
  .dp-toast { white-space: normal !important; width: max-content !important; max-width: calc(100% - 32px) !important; box-sizing: border-box; text-align: center; overflow-wrap: anywhere; }
}
@media (max-width: 768px) and (max-height: 500px) {
  .mobile-menu { justify-content: flex-start !important; gap: 1rem !important; padding: calc(var(--nav-h, 64px) + 1rem) 0 calc(1rem + var(--cookie-h, 0px)); }
}
/* the banner is fixed to the bottom: keep the end of every page scrollable clear of it */
html.cookie-open body { padding-bottom: var(--cookie-h, 0px); }

/* [audit 20261016] The i18n runtime's floating language switch (z-index 2147483000, bottom-right) sat on top of the cookie
   banner's right-hand button. This page publishes the banner height (html.cookie-open + --cookie-h), so lift the switch above it. */
html.cookie-open .dm-i18n-switch--floating { bottom: calc(max(14px, env(safe-area-inset-bottom, 0px)) + var(--cookie-h, 0px)); }
