/* ========================================
   Mobile-Only Styles
   Loaded only on screens <= 768px via media attribute in HTML.
   ======================================== */

/* ---- Nav: logo left, hamburger right, links in a drop-down panel ---- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}

nav.scrolled {
    padding-block: 0.75rem;
}

.logo {
    font-size: 1.1rem;
}

.nav-hamburger {
    display: flex;
}

.nav-cta {
    display: none;
}

.nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 5% 1rem;
    background: rgba(250, 250, 247, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.nav-links.open {
    display: flex;
    animation: fadeInUp 0.35s var(--ease) both;
}

.nav-links li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}

.nav-links li:last-child {
    border-bottom: none;
}

.nav-links a {
    font-size: 1rem;
    color: var(--ink);
}

.nav-links > li > a::after {
    display: none;
}

.nav-dropdown::after {
    display: none;
}

.nav-dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.25rem 0 0;
    min-width: 0;
}

.nav-dropdown-menu a {
    padding: 0.4rem 1rem;
    font-size: 0.92rem;
    color: var(--muted);
}

/* ---- Hero ---- */
.hero {
    padding: 7.5rem 5% 3.5rem;
}

.hero::after {
    width: 380px;
    height: 380px;
}

.hero-title {
    font-size: clamp(2.6rem, 12vw, 3.4rem) !important;
    min-height: 1.15em;
}

/* Keep the greeting on one line so the title doesn't need two lines of space */
.hero-title #greeting {
    font-size: 0.68em;
    top: 0.25em;
}


.hero-tagline {
    font-size: 1rem;
}

.hero-cta {
    flex-direction: column;
    align-items: center;
}

/* ---- Section spacing ---- */
.about,
.testimonials {
    padding: 4rem 5%;
}

.cta {
    padding: 0;
}

.cta-container {
    padding: 4rem 5%;
}

/* ---- About ---- */
.about-container {
    grid-template-columns: 1fr;
    gap: 3rem;
}

.about-image {
    max-width: 240px;
}

.about-stats {
    display: none;
}

/* ---- Experience logos ---- */
.experience-bar {
    padding: 3rem 5%;
}

.experience-logos {
    flex-wrap: wrap;
    gap: 1.5rem;
}

.experience-item {
    justify-self: unset !important;
}

.experience-logo {
    height: 60px !important;
    width: auto;
}

.experience-logo.sion-hill {
    height: 90px !important;
    transform: none !important;
}

.experience-logo.orrick {
    height: 50px !important;
    transform: translateY(-30%) !important;
}

.experience-item:has(.linklaters),
.experience-item:has(.marsh) {
    padding: 0;
}

.experience-logo.linklaters {
    height: 20px !important;
}

.experience-logo.marsh {
    height: 24px !important;
}

/* ---- Testimonials: swipeable row of cards ---- */
.testimonials {
    padding-inline: 0;
}

.testimonials .section-header {
    padding-inline: 5%;
    margin-bottom: 2rem;
}

.testimonial-grid {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 5% 0.5rem;
    scroll-padding-inline: 5%;
    scrollbar-width: none;
}

.testimonial-grid::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    flex: 0 0 82%;
    scroll-snap-align: start;
    padding: 2.5rem 1.4rem 1.5rem;
}

.testimonial-card p {
    font-size: 0.95rem;
    line-height: 1.7;
}

.testimonial-hint {
    display: block;
}

/* ---- Experience pages ---- */
.xp-hero {
    padding: 7rem 5% 2.75rem;
}

.xp-stats {
    padding: 2.5rem 5% 0.5rem;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.xp-stat {
    padding: 1rem 1.1rem 0.95rem;
}

.xp-stat-value {
    font-size: 2.1rem;
    margin-bottom: 0.35rem;
}

.xp-stat-label {
    font-size: 0.88rem;
}

.xp-aside-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.25rem;
}

.xp-highlights,
.xp-highlights.three {
    grid-template-columns: 1fr;
    padding: 2rem 5% 1rem;
    gap: 0.75rem;
}

.xp-card {
    padding: 1.25rem;
    gap: 1rem;
}

.xp-icon {
    width: 42px;
    height: 42px;
}

.xp-carousel {
    padding: 2rem 0 4rem;
}

.xp-carousel-head,
.xp-progress {
    margin-inline: 5%;
}

.xp-track {
    padding-inline: 5%;
    scroll-padding-inline: 5%;
}

.xp-slide {
    height: 300px;
    max-width: 85vw;
}

.xp-slide img {
    width: 100%;
    object-fit: cover;
}

/* ---- Footer ---- */
.footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-brand {
    grid-column: 1 / -1;
}

/* ========================================
   Phone sizing pass: fluid type and tighter spacing.
   Everything here is phone-only (this file loads at <= 768px).
   ======================================== */

/* Scale every rem-based size down slightly */
html {
    font-size: 15px;
}

/* Headings scale with screen width instead of fixed desktop sizes */
.section-title,
.about-content h2,
.cta h2 {
    font-size: clamp(1.9rem, 8.5vw, 2.4rem);
}

.xp-hero h1 {
    font-size: clamp(2rem, 9.5vw, 2.6rem);
    margin-bottom: 0.8rem;
}

.xp-summary,
.hero-tagline {
    font-size: 0.98rem;
    line-height: 1.6;
}

.hero-tagline {
    max-width: 30ch;
    margin-bottom: 1.75rem;
}

/* Hero buttons side by side and a touch smaller */
.hero-cta {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.2rem;
    font-size: 0.92rem;
    white-space: nowrap;
}

/* Section spacing */
.hero {
    padding: 6.5rem 5% 3rem;
}

.about,
.testimonials {
    padding-block: 3.25rem;
}

.xp-hero {
    padding: 6.25rem 5% 2.25rem;
}

/* About */
.about-container {
    gap: 2.25rem;
}

.about-image {
    max-width: 200px;
}

.about-image::before {
    inset: 12px -12px -12px 12px;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Testimonials */
.testimonial-card p {
    font-size: 0.95rem;
}

/* CTA band */
.cta-container {
    padding: 3.25rem 6%;
}

.cta p {
    font-size: 0.98rem;
    margin-bottom: 1.75rem;
}

/* Experience pages */
.xp-stat-value {
    font-size: 1.9rem;
}

.xp-card h3 {
    font-size: 1.05rem;
}

.xp-card p {
    font-size: 0.93rem;
}

.xp-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
}

.xp-icon svg {
    width: 19px;
    height: 19px;
}

.xp-carousel-head h2 {
    font-size: 1.3rem;
}

.xp-carousel-nav button {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
}

.xp-slide {
    height: 260px;
}

/* Footer */
footer {
    padding: 3rem 5% 2rem;
}

.footer-container {
    gap: 1.75rem 1.5rem;
}

.footer-links li {
    margin-bottom: 0.45rem;
}

.footer-bottom {
    margin-top: 2.25rem;
    padding-top: 1.25rem;
}

/* ---- About photo: 10% smaller with tighter spacing ---- */
.about {
    padding-top: 2.5rem;
}

.about-container {
    gap: 1.5rem;
}

.about-image {
    max-width: 180px;
}

.about-image::before {
    inset: 9px -9px -9px 9px;
}

/* ---- Experience logos: carousel showing three at a time (driven by main.js) ---- */
.experience-bar {
    padding: 2.5rem 0;
}

.experience-text {
    margin-bottom: 1.5rem;
}

.experience-container {
    overflow: hidden;
    padding-inline: 3%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.experience-logos {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0;
}

.experience-logos.is-carousel {
    transition: transform 0.8s var(--ease);
}

.experience-item {
    flex: 0 0 33.3333%;
    height: 64px;
    padding: 0 0.6rem;
}

.experience-item:has(.linklaters),
.experience-item:has(.marsh) {
    padding: 0 0.6rem;
}

.experience-logo.sion-hill {
    height: 32px !important;
}

.experience-logo.orrick {
    height: 44px !important;
    transform: translateY(-22%) !important;
}

.experience-logo.marsh {
    height: 19px !important;
}

.experience-logo.linklaters {
    height: 18px !important;
}

.experience-logo.tlc {
    height: 46px !important;
}

/* ---- About: photo and "About Me" side by side, closer to the hero ---- */
.hero {
    padding-bottom: 2rem;
}

.about {
    padding-top: 1.75rem;
}

.about-container {
    grid-template-columns: auto 1fr;
    column-gap: 1.1rem;
    row-gap: 0;
    align-items: center;
}

/* Let the heading and paragraphs sit directly in the grid */
.about-content {
    display: contents;
}

.about-image {
    width: 112px;
    max-width: 112px;
    margin-bottom: 1.4rem;
}

.about-image::before {
    inset: 6px -6px -6px 6px;
    border-radius: 16px;
}

.about-image img {
    border-radius: 16px;
}

.about-content h2 {
    font-size: 1.9rem;
    margin: 0 0 1.4rem;
    padding-bottom: 0.6rem;
    align-self: center;
}

.about-content p {
    grid-column: 1 / -1;
}

/* ---- Linklaters flow: stack steps with downward arrows ---- */
.xp-flow {
    padding: 2.5rem 5% 0.5rem;
}

.xp-flow-lead {
    font-size: 0.98rem;
    margin-bottom: 1.1rem;
    padding-left: 0.8rem;
}

.xp-flow-steps {
    grid-template-columns: 1fr;
    gap: 1.6rem;
}

.xp-step:not(:last-child)::after {
    content: '↓';
    right: auto;
    left: 1.1rem;
    top: auto;
    bottom: -1.5rem;
    transform: none;
    font-size: 1rem;
}

/* ---- Experience metrics: compact tiles side by side ---- */
.xp-stats {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.5rem;
    padding-top: 1.75rem;
}

.xp-stats .xp-stat {
    padding: 0.85rem 0.7rem 0.8rem;
    border-left: none;
    border: 1px solid var(--line);
    border-top: 2px solid var(--accent);
    border-radius: 12px;
    background: var(--surface);
}

.xp-stats .xp-stat-value {
    font-size: clamp(1.05rem, 5vw, 1.35rem);
    letter-spacing: -0.03em;
    margin-bottom: 0.3rem;
    white-space: nowrap;
}

.xp-stats .xp-stat-label {
    display: block;
    font-size: 0.72rem;
    line-height: 1.4;
}

/* ---- Linklaters flow: same compact tiles, side by side with arrows ---- */
.xp-flow-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}

.xp-flow-steps .xp-step {
    padding: 0.85rem 0.65rem 0.8rem;
    border-left: none;
    border: 1px solid var(--line);
    border-top: 2px solid var(--accent);
    border-radius: 12px;
    background: var(--surface);
}

.xp-flow-steps .xp-step:not(:last-child)::after {
    content: '→';
    left: auto;
    right: -0.82rem;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: 0.75rem;
    font-size: 0.8rem;
}

.xp-flow-steps .xp-step-tag {
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
}

.xp-flow-steps .xp-stat-value {
    font-size: clamp(1.05rem, 5vw, 1.35rem);
    letter-spacing: -0.03em;
    margin-bottom: 0.3rem;
}

.xp-flow-steps .xp-stat-label {
    display: block;
    font-size: 0.72rem;
    line-height: 1.4;
}

/* ---- Experience title panels: same height on every page ---- */
.xp-hero {
    min-height: 290px;
    padding: 5.5rem 5% 1.75rem;
}

.xp-slide.fit {
    width: 85vw;
}

.xp-slide.fit img {
    height: auto;
    object-fit: contain;
}

/* ---- Floating contact button: smaller on phones ---- */
.float-contact {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    padding: 0.7rem 1.1rem 0.7rem 0.95rem;
    font-size: 0.88rem;
}

/* ---- Galleries of posters/graphics: show each image whole and large ---- */
.xp-carousel.full .xp-track {
    align-items: center;
}

.xp-carousel.full .xp-slide,
.xp-carousel.full .xp-slide.fit {
    height: auto;
    width: 82vw;
    max-width: 82vw;
    background: #fff;
}

.xp-carousel.full .xp-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ========================================
   Home page restructure: About first, then "Let's connect?"
   (later rules here override the earlier hero/about phone rules)
   ======================================== */
.about {
    padding-top: 5.75rem;
    padding-bottom: 2.75rem;
}

.about-greeting {
    font-size: clamp(1.55rem, 7.2vw, 1.95rem);
    margin: 0 0 1.4rem;
    align-self: center;
}

.hero.connect {
    padding: 3rem 5% 3.25rem;
}

.connect-title {
    font-size: clamp(2.4rem, 11vw, 3rem);
    margin-bottom: 0.9rem;
}

/* Logos added through the admin panel */
.experience-logo.custom {
    height: var(--logo-mh, 28px) !important;
}
