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

:root {
    --bg:       #faf6ef;
    --bg-soft:  #f0e9de;
    --ink:      #2e1a47;
    --ink-deep: #1f0f32;
    --muted:    rgba(46, 26, 71, 0.6);
    --line:     rgba(46, 26, 71, 0.15);
    --orange:   #e66f3e;
    --orange-deep: #d35b2c;
    --purple:   #3d2655;
    --lavender: #d5c7e5;
    --white:    #ffffff;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.back-link {
    position: fixed;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 0.45rem 0.9rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(46, 26, 71, 0.08);
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.3s;
}
.back-link:hover { opacity: 1; transform: translateY(-2px); }

/* =========================================================
   LOADER — Scales of justice
   ========================================================= */
.loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.loader__scales {
    width: min(240px, 55vw);
    height: auto;
    filter: drop-shadow(0 15px 25px rgba(46, 26, 71, 0.1));
}
.loader__svg { width: 100%; height: auto; display: block; }

#scales-beam {
    transform-origin: 120px 60px;
    will-change: transform;
}

.loader__meta {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
}
.loader__counter {
    color: var(--orange);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
    letter-spacing: 0.1em;
}

/* =========================================================
   COUNSEL SECTION
   ========================================================= */
.counsel {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background: var(--bg);
}

/* Background waves */
.waves {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}
.waves path {
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
}

/* ---------- Top nav ---------- */
.topnav {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 3rem;
}

.topnav__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--ink);
    will-change: transform;
}
.topnav__logo-mark {
    width: 60px; height: 60px;
    flex-shrink: 0;
}
.topnav__logo-mark svg {
    width: 100%; height: 100%;
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.topnav__logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.topnav__logo-text small {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 0.1rem;
}
.topnav__logo-text big {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.03em;
}

.topnav__nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.topnav__nav a {
    position: relative;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.3rem 0;
    will-change: transform;
}
.topnav__home {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--bg-soft);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: var(--orange);
    padding: 0 !important;
    transition: background 0.3s, transform 0.3s;
}
.topnav__home:hover { background: var(--orange); color: #fff; }
.topnav__home svg { width: 18px; height: 18px; }
.topnav__home::after { display: none !important; }
.topnav__nav a:not(.topnav__home)::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 100%; height: 1.5px;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.topnav__nav a:not(.topnav__home):hover::after { transform: scaleX(1); transform-origin: left; }

.topnav__phone {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--ink);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    will-change: transform;
    font-variant-numeric: tabular-nums;
}
.topnav__phone-icon {
    width: 34px; height: 34px;
    background: var(--orange);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.topnav__phone-icon svg { width: 16px; height: 16px; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    z-index: 10;
    min-height: calc(100vh - 110px);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    padding: 2rem 3rem 4rem;
    align-items: center;
}

/* ----- Photo cluster ----- */
.photos {
    position: relative;
    height: 620px;
    max-height: 70vh;
    max-width: 720px;
}
.photo {
    position: absolute;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 20px 50px rgba(46, 26, 71, 0.2);
    will-change: transform;
}
.photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 30%;
    user-select: none;
    transition: transform 0.6s ease;
}
.photo:hover img { transform: scale(1.08); }

.photo--team { top: 4%;  left: 0;    width: 46%; aspect-ratio: 1; }
.photo--walk { top: 20%; left: 48%;  width: 34%; aspect-ratio: 1; }
.photo--desk { top: 62%; left: 24%;  width: 38%; aspect-ratio: 1; }

.photo-badge {
    position: absolute;
    background: var(--white);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    box-shadow: 0 10px 24px rgba(46, 26, 71, 0.12);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 5;
    will-change: transform;
}
.photo-badge__num {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--orange);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.photo-badge__num em { font-style: normal; font-size: 0.7em; color: var(--purple); }
.photo-badge__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--ink);
    text-transform: uppercase;
    line-height: 1.2;
}
.photo-badge--1 { top: 28%; left: 40%; }
.photo-badge--2 { top: 86%; left: 5%; }

/* ----- Title ----- */
.hero__title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: 1.02;
    letter-spacing: -0.01em;
    font-weight: 700;
    color: var(--ink);
}
.hero__line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.04em;
}
.hero__line em {
    font-style: italic;
    color: var(--orange);
    font-weight: 700;
    display: inline-block;
    will-change: transform;
}
.hero__line b {
    color: var(--purple);
    font-weight: 800;
    display: inline-block;
    will-change: transform;
}
.hero__char {
    display: inline-block;
    will-change: transform;
    transition: color 0.3s ease, transform 0.3s;
}
.hero__char.is-space { width: 0.2em; }

/* Desc + CTA row */
.hero__desc {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--muted);
    font-weight: 400;
}

.hero__cta-row {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--orange);
    color: #fff;
    text-decoration: none;
    padding: 0.95rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 12px 24px rgba(230, 111, 62, 0.35);
    overflow: hidden;
    will-change: transform;
}
.cta__label, .cta__arrow { position: relative; z-index: 2; }
.cta__arrow svg { width: 14px; height: 14px; transition: transform 0.3s; }
.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--purple);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 1;
}
.cta:hover::before { transform: scaleX(1); transform-origin: left; }
.cta:hover .cta__arrow svg { transform: translateX(4px); }

.hero__secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    will-change: transform;
    position: relative;
}
.hero__secondary svg { width: 28px; height: 28px; color: var(--purple); transition: transform 0.4s; }
.hero__secondary:hover svg { transform: rotate(360deg); }
.hero__secondary span { position: relative; }
.hero__secondary span::after {
    content: '';
    position: absolute;
    left: 0; bottom: -3px;
    width: 100%; height: 1.5px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s;
}
.hero__secondary:hover span::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Initial hidden states ---------- */
[data-magnetic], [data-link], [data-fade], [data-title-line] em,
[data-title-line] b, [data-photo], [data-badge] { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .hero { grid-template-columns: 1fr; padding: 2rem 2rem 3rem; }
    .photos { height: 420px; margin: 0 auto; }
    .topnav { padding: 1rem 1.5rem; gap: 1rem; }
    .topnav__nav { display: none; }
}
@media (max-width: 760px) {
    .topnav__logo-mark { width: 44px; height: 44px; }
    .topnav__logo-text big { font-size: 1.1rem; }
    .topnav__logo-text small { font-size: 0.55rem; }
    .topnav__phone { gap: 0.4rem; font-size: 0.85rem; }
    .topnav__phone-icon { width: 28px; height: 28px; }
    .hero { padding: 1.5rem 1.25rem; }
    .photos { height: 340px; }
    .photo-badge { padding: 0.5rem 0.75rem; }
    .photo-badge__num { font-size: 1.3rem; }
    .photo-badge__label { font-size: 0.55rem; }
    .hero__title { font-size: clamp(2.4rem, 11vw, 4rem); }
}
@media (max-width: 480px) {
    .topnav__logo-text small { display: none; }
    .topnav__phone span:last-child { display: none; }
    .photos { height: 300px; }
    .photo-badge--1 { display: none; }
    .hero__cta-row { gap: 1rem; }
    .cta { padding: 0.75rem 1.25rem; font-size: 0.85rem; }
}
