/* ==========================================================================
   Base & Reset
   ========================================================================== */
:root {
    color-scheme: light;

    --bg-main: #f7f7f4;
    --bg-surface: #ffffff;
    --bg-overlay: rgba(247, 247, 244, 0.86);

    --text-primary: #161513;
    --text-muted: #6e6a61;
    --text-accent: #9a6b2f;
    /* Subtle gold/bronze for legal premium vibe */

    --border-dim: #e0ddd4;
    --border-light: #c8c2b5;

    --hero-overlay-bottom: #f7f7f4;
    --hero-overlay-middle: rgba(247, 247, 244, 0.08);
    --hero-overlay-top: rgba(247, 247, 244, 0.42);
    --header-bg: rgba(247, 247, 244, 0.86);
    --btn-primary-hover-bg: #161513;
    --btn-primary-hover-text: #ffffff;
    --selection-text: #ffffff;

    --font-heading: 'Cormorant Garamond', serif;
    --font-ui: 'Inter', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.6s var(--ease-out-expo);
}

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

html {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: 16px;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.45s ease, color 0.45s ease;
}

/* Lenis smooth scroll */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

body {
    font-family: var(--font-ui);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    background-color: var(--bg-main);
    color: var(--text-primary);
    transition: background-color 0.45s ease, color 0.45s ease;
}

/* Selection */
::selection {
    background: var(--text-accent);
    color: var(--selection-text);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.1;
    margin: 0;
}

.italic {
    font-style: italic;
    color: var(--text-accent);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-smooth);
}

a:hover {
    color: var(--text-accent);
}

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 4vw;
}

.section {
    padding: 12vw 0;
    position: relative;
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    padding: 1rem 2rem;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: background-color var(--transition-smooth), color var(--transition-smooth), border-color var(--transition-smooth), transform var(--transition-smooth);
    border-radius: 2px;
}

.btn--primary {
    background-color: var(--text-accent);
    color: var(--bg-main);
}

.btn--primary:hover {
    background-color: var(--btn-primary-hover-bg);
    color: var(--btn-primary-hover-text);
}

.btn--outline {
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.btn--outline:hover {
    background-color: var(--text-primary);
    color: var(--bg-main);
}

.btn--full {
    width: 100%;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background-color: var(--text-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor.hovered {
    width: 40px;
    height: 40px;
    background-color: var(--text-accent);
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .cursor {
        display: none;
    }
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 2rem 0;
    color: var(--text-primary);
    transition: padding 0.4s, background-color 0.4s, border-color 0.4s, color 0.4s;
}

.header.scrolled {
    padding: 1rem 0;
    color: var(--text-primary);
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-dim);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header__logo {
    display: flex;
    flex-direction: column;
}

.logo__text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.logo__sub {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--text-accent);
    text-transform: uppercase;
}

.header__contact {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header__address,
.header__phone {
    font-size: 0.875rem;
    font-weight: 300;
}

.header__right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

@media (max-width: 1100px) {
    .header__address {
        display: none;
    }
}

@media (max-width: 900px) {
    .header__phone {
        display: none;
    }
}

@media (max-width: 768px) {

    .header__address,
    .header__phone {
        display: none;
    }

    .header .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.75rem;
    }

    .header__inner {
        gap: 1rem;
    }

    .header__right {
        gap: 0.85rem;
    }
}

@media (max-width: 560px) {
    .header {
        padding: 1rem 0;
    }

    .header.scrolled {
        padding: 0.8rem 0;
    }

    .logo__text {
        font-size: 1.15rem;
    }

    .logo__sub {
        font-size: 0.56rem;
    }

    .header__right {
        margin-left: auto;
    }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4vw;
    isolation: isolate;
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/tsaturyan.webp');
    /* Using new high-res image */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center 16%;
    z-index: -1;
}

.hero__overlay {
    position: absolute;
    inset: 0 0 -3px;
    background: linear-gradient(to top, var(--hero-overlay-bottom) 0%, var(--hero-overlay-middle) 60%, var(--hero-overlay-top) 100%);
    transition: background 0.55s ease;
}

.hero__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.hero__headline {
    flex: 1;
}

.hero__line-wrap {
    overflow: hidden;
}

.hero__title {
    font-size: clamp(3rem, 7vw, 7rem);
    text-transform: uppercase;
    line-height: 0.95;
    letter-spacing: 0.02em;
    transform: translateY(110%);
    /* For GSAP reveal */
}

.hero__title--italic {
    font-style: italic;
    color: var(--text-accent);
    text-transform: lowercase;
    padding-left: 10%;
}

.hero__details {
    flex: 0 0 350px;
    margin-bottom: 2rem;
}

.hero__subtitle {
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero__stats {
    position: absolute;
    bottom: -6vw;
    right: 4vw;
    z-index: 2;
    display: flex;
    gap: 3rem;
    background: var(--bg-surface);
    padding: 2.5rem 4rem;
    border: 1px solid var(--border-dim);
    transition: background-color 0.45s ease, border-color 0.45s ease;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1;
    color: var(--text-accent);
}

.stat-num--plus::after {
    content: '+';
    font-size: 2rem;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

@media (max-width: 1024px) {
    .hero {
        display: block;
        height: auto;
        min-height: 0;
        padding-top: clamp(28rem, 58svh, 36rem);
        padding-bottom: clamp(2.75rem, 4vw, 3.5rem);
    }

    .hero__bg {
        height: clamp(28rem, 58svh, 36rem);
        background-position: center 12%;
    }

    .hero__overlay {
        background: linear-gradient(to bottom,
                rgba(247, 247, 244, 0.58) 0%,
                rgba(247, 247, 244, 0.12) 38%,
                rgba(247, 247, 244, 0) 62%,
                var(--bg-main) 100%);
    }

    .hero__content {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        min-height: 0;
    }

    .hero__headline {
        width: 100%;
    }

    .hero__title {
        font-size: clamp(3.1rem, 9.4vw, 5.25rem);
        line-height: 0.98;
    }

    .hero__title--italic {
        padding-left: 6%;
    }

    .hero__details {
        flex: none;
        width: 100%;
        max-width: 430px;
        margin-top: 1.75rem;
        margin-bottom: 0;
    }

    .hero__subtitle {
        margin-bottom: 1.5rem;
    }

    .hero__stats {
        position: relative;
        bottom: 0;
        right: 0;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
        margin-top: 2rem;
        width: 100%;
        padding: 1.5rem;
    }
}

@media (min-width: 1025px) and (min-height: 961px) {
    .hero__bg {
        background-size: auto clamp(1320px, calc((100vw * 1.25) - ((100vh - 960px) * 1.15)), 3200px);
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: clamp(25rem, 62svh, 34rem);
        padding-bottom: 3rem;
    }

    .hero__bg {
        height: clamp(25rem, 62svh, 34rem);
        background-position: center 12%;
    }

    .hero__title {
        font-size: clamp(2.35rem, 11.8vw, 3.7rem);
    }

    .hero__title--italic {
        padding-left: 6%;
    }

    .hero__details {
        max-width: 360px;
        margin-top: 1.5rem;
    }

    .hero__subtitle {
        margin-bottom: 1.5rem;
        font-size: 0.95rem;
    }

    .hero__stats {
        gap: 1rem;
        margin-top: 2rem;
        padding: 1.35rem;
    }

    .stat-num {
        font-size: clamp(2.2rem, 9vw, 2.85rem);
    }

    .stat-label {
        font-size: 0.62rem;
        letter-spacing: 0.08em;
    }
}

@media (max-width: 430px) {
    .hero {
        padding-top: clamp(24.5rem, 61svh, 31.5rem);
    }

    .hero__bg {
        height: clamp(24.5rem, 61svh, 31.5rem);
    }

    .hero__content {
        min-height: 0;
    }

    .hero__title {
        font-size: clamp(2.3rem, 11.8vw, 3.2rem);
    }

    .hero__title--italic {
        padding-left: 5%;
    }
}

/* ==========================================================================
   About
   ========================================================================== */
.about {
    padding-top: 15vw;
    padding-bottom: clamp(1.25rem, 1.8vw, 2.5rem);
}

.about__grid {
    display: grid;
    grid-template-columns: 4fr 5fr;
    gap: 8vw;
    align-items: start;
}

.about__visual {
    position: relative;
    width: 100%;
    align-self: start;
}

.about__image-wrapper {
    overflow: hidden;
    position: relative;
    aspect-ratio: 2 / 2.78;
    background-color: var(--bg-surface);
    transition: background-color 0.45s ease;
}

.about__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
}

.section-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-accent);
    margin-bottom: 1.5rem;
    display: inline-block;
    border-bottom: 1px solid var(--text-accent);
    padding-bottom: 0.25rem;
}

.section-title {
    font-size: clamp(3rem, 5vw, 5rem);
    margin-bottom: 4rem;
    line-height: 1;
}

.about__bio {
    margin-bottom: 3rem;
    padding-left: 2rem;
    border-left: 2px solid var(--border-light);
}

.about__name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.about__desc {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.about__content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.about__signature {
    margin-top: 4rem;
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-style: italic;
    color: var(--text-accent);
    opacity: 0.72;
}

.bio-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.15rem;
    padding: 0.55rem 0.85rem;
    border: 1px dashed var(--border-light);
    border-radius: 2px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: color 0.35s, border-color 0.35s, background-color 0.35s;
}

.bio-toggle::after {
    content: '+';
    color: var(--text-accent);
    font-size: 0.9rem;
    line-height: 1;
}

.bio-toggle:hover,
.bio-toggle[aria-expanded="true"] {
    color: var(--text-primary);
    border-color: var(--text-accent);
    background-color: rgba(154, 107, 47, 0.04);
}

.bio-toggle[aria-expanded="true"]::after {
    content: '-';
}

.about-biography {
    overflow: hidden;
}

.about-biography__inner {
    max-width: 760px;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border-light);
}

.about-biography__intro {
    max-width: 680px;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
}

.bio-timeline {
    display: grid;
    gap: 1.1rem;
    margin-top: 2rem;
}

.bio-timeline__item {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 1.5rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--border-dim);
}

.bio-timeline__item span {
    color: var(--text-accent);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1.2;
}

.bio-timeline__item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.65;
}

.bio-focus {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.6rem;
}

.bio-focus span {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border-dim);
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .about__grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .about__text {
        order: 1;
    }

    .about__visual {
        order: 2;
        width: min(78%, 360px);
        margin: clamp(2.75rem, 8vw, 4rem) auto 0;
    }
}

@media (max-width: 620px) {
    .bio-timeline__item {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

/* ==========================================================================
   Services Accordion (Complex Grid feel)
   ========================================================================== */
.services__header {
    margin-bottom: clamp(3rem, 4vw, 4.25rem);
}

.services {
    padding-top: clamp(0.75rem, 1.5vw, 1.75rem);
    padding-bottom: clamp(2.25rem, 3vw, 3.75rem);
}

.services__accordion {
    border-top: 1px solid var(--border-dim);
}

.service-item {
    border-bottom: 1px solid var(--border-dim);
    transition: border-color 0.45s ease;
}

.service-item__header {
    display: grid;
    grid-template-columns: 100px 1fr 50px;
    align-items: center;
    padding: 3rem 0;
    cursor: pointer;
    transition: color 0.4s;
}

.service-item__header:hover {
    color: var(--text-accent);
}

.service-item__num {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-muted);
}

.service-item__title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
}

.service-item__icon {
    display: grid;
    place-items: center;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    transition: all 0.4s;
}

.service-item.active .service-item__icon {
    transform: rotate(45deg);
    background: var(--text-primary);
    color: var(--bg-main);
}

.service-item__content {
    height: 0;
    overflow: hidden;
}

.service-item__inner {
    padding: 0 0 3rem 100px;
}

.service-item__inner p {
    max-width: 600px;
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.6;
}

.service-item__lead {
    margin-bottom: 2rem;
}

.service-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    max-width: 980px;
    border-top: 1px solid var(--border-dim);
}

.service-detail {
    border-bottom: 1px solid var(--border-dim);
    padding: 1.15rem 1.5rem 1.15rem 0;
}

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

.service-detail:nth-child(even) {
    padding-left: 1.5rem;
}

.service-detail summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--text-primary);
    transition: color 0.3s;
}

.service-detail summary::-webkit-details-marker {
    display: none;
}

.service-detail summary::after {
    content: '+';
    float: right;
    margin-left: 1rem;
    color: var(--text-accent);
}

.service-detail[open] summary {
    color: var(--text-accent);
}

.service-detail[open] summary::after {
    content: '-';
}

.service-detail p {
    max-width: none;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .about {
        padding-top: 0;
    }

    .section-title {
        margin-bottom: 2.5rem;
    }

    .about__bio {
        margin-bottom: 2.5rem;
    }

    .about__signature {
        margin-top: 2rem;
    }

    .service-item__header {
        grid-template-columns: 50px 1fr 40px;
        padding: 2rem 0;
    }

    .service-item__inner {
        padding: 0 0 2rem;
    }

    .service-detail-grid {
        grid-template-columns: 1fr;
    }

    .service-detail,
    .service-detail:nth-child(even),
    .service-detail:nth-child(odd) {
        padding-left: 0;
        padding-right: 0;
        border-right: 0;
    }

    .service-detail summary {
        display: grid;
        grid-template-columns: 1rem minmax(0, 1fr);
        gap: 0.75rem;
        align-items: start;
    }

    .service-detail summary::before {
        content: '+';
        color: var(--text-accent);
        line-height: 1.35;
    }

    .service-detail summary::after {
        content: none;
    }

    .service-detail[open] summary::before {
        content: '-';
    }

    .service-detail[open] summary::after {
        content: none;
    }

    .service-item__icon {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   Certificates
   ========================================================================== */
.certificates {
    padding-top: clamp(1.75rem, 2.5vw, 3rem);
}

.certificates__header {
    margin-bottom: clamp(2.5rem, 3vw, 3.5rem);
}

.certificates__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 1rem;
}

.certificate-item {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    cursor: pointer;
}

.certificate-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth), filter var(--transition-smooth);
}

.certificate-item:hover img {
    transform: scale(1.04);
    filter: contrast(1.04);
}

.certificate-gallery[hidden] {
    display: none;
}

.certificate-gallery {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 3vw, 3rem);
}

.certificate-gallery__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(247, 247, 244, 0.92);
    backdrop-filter: blur(14px);
    cursor: pointer;
}

.certificate-gallery__stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: center;
    width: min(100%, 1080px);
    height: min(100%, 86vh);
    gap: clamp(0.75rem, 2vw, 1.5rem);
}

.certificate-gallery__top {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.certificate-gallery__counter {
    color: var(--text-accent);
}

.certificate-gallery__close,
.certificate-gallery__nav {
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.35s, border-color 0.35s, background-color 0.35s;
}

.certificate-gallery__close {
    padding: 0.7rem 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.certificate-gallery__nav {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 1.25rem;
}

.certificate-gallery__close:hover,
.certificate-gallery__nav:hover {
    color: var(--text-accent);
    border-color: var(--text-accent);
    background-color: rgba(154, 107, 47, 0.04);
}

.certificate-item:focus-visible,
.certificate-gallery__close:focus-visible,
.certificate-gallery__nav:focus-visible {
    outline: 1px solid var(--text-accent);
    outline-offset: 4px;
}

.certificate-gallery__figure {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 1rem;
    justify-items: center;
    height: 100%;
    min-width: 0;
}

.certificate-gallery__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 1px solid var(--border-dim);
    background: var(--bg-surface);
    box-shadow: 0 24px 70px rgba(22, 21, 19, 0.16);
}

.certificate-gallery__caption {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

html.gallery-open,
html.gallery-open body {
    overflow: hidden;
}

@media (max-width: 1100px) {
    .certificates__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .certificates__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .certificate-gallery {
        padding: 1rem;
    }

    .certificate-gallery__stage {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        align-content: center;
        height: 88vh;
    }

    .certificate-gallery__figure {
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-rows: auto auto;
        height: auto;
        max-height: calc(88vh - 9rem);
    }

    .certificate-gallery__image {
        max-height: calc(88vh - 12rem);
    }

    .certificate-gallery__nav {
        width: 48px;
        height: 48px;
    }

    .certificate-gallery__nav--prev,
    .certificate-gallery__nav--next {
        grid-row: 3;
    }

    .certificate-gallery__nav--prev {
        justify-self: start;
    }

    .certificate-gallery__nav--next {
        justify-self: end;
    }
}

/* ==========================================================================
   Contact Forms
   ========================================================================== */
.contact {
    padding-top: clamp(3.5rem, 5vw, 5.5rem);
    padding-bottom: clamp(3.75rem, 5.5vw, 6rem);
    background-color: var(--bg-surface);
    transition: background-color 0.45s ease;
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8vw;
}

.contact__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact__title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 4rem;
}

.contact__methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 4rem;
}

.contact__link {
    font-size: clamp(2rem, 3vw, 3rem);
    font-family: var(--font-heading);
}

.contact__link--small {
    font-size: 1.25rem;
    font-family: var(--font-ui);
    color: var(--text-muted);
}

.contact__address {
    font-size: 1rem;
    color: var(--text-muted);
    border-left: 1px solid var(--text-accent);
    padding-left: 1.5rem;
}

.contact__hours {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.contact__form-wrap {
    padding: 4rem;
    background: var(--bg-main);
    border: 1px solid var(--border-dim);
    transition: background-color 0.45s ease, border-color 0.45s ease;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--text-accent);
}

.form-textarea {
    resize: none;
}

.form-label {
    position: absolute;
    left: 0;
    top: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s;
    font-size: 1rem;
}

.form-input:focus~.form-label,
.form-input:not(:placeholder-shown)~.form-label {
    top: -10px;
    font-size: 0.75rem;
    color: var(--text-accent);
}

.form-action {
    margin-top: 3rem;
}

.form-consent {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 0.8rem;
    align-items: start;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.form-consent input {
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
    accent-color: var(--text-accent);
}

.form-consent a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--border-light);
    text-underline-offset: 0.2em;
}

.form-policy {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.form-policy a {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .contact {
        padding-top: clamp(3rem, 5vw, 5.5rem);
    }

    .contact__title {
        margin-bottom: 2rem;
    }

    .contact__container {
        grid-template-columns: 1fr;
    }

    .contact__form-wrap {
        padding: 2rem;
    }
}

/* ==========================================================================
   Location
   ========================================================================== */
.location {
    padding-top: clamp(5rem, 8vw, 9rem);
}

.location__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 4vw;
    align-items: end;
    margin-bottom: 4rem;
}

.location__contacts {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    color: var(--text-muted);
    border-left: 1px solid var(--text-accent);
    padding-left: 1.5rem;
}

.location__contacts a {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 2rem;
}

.location__map {
    min-height: 500px;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
}

.location__map > ymaps,
.location__map iframe {
    display: block;
    width: 100% !important;
}

@media (max-width: 760px) {
    .location {
        padding-top: clamp(3rem, 8vw, 9rem);
    }

    .location__header {
        grid-template-columns: 1fr;
    }

    .location__map {
        min-height: 380px;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border-dim);
    transition: border-color 0.45s ease;
}

.footer__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer__socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2rem;
}

.footer__social-link {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    .footer__container {
        flex-direction: column-reverse;
        gap: 2rem;
        text-align: center;
    }

    .footer__socials {
        display: grid;
        grid-template-columns: repeat(2, max-content);
        justify-content: center;
        justify-items: center;
        gap: 0.9rem 2rem;
        text-align: center;
    }
}
