/* Explain: Styles for UI components including header, navigation, buttons, hero, forms, and footer. */
/*
  Explain: Component styles — header/navigation, buttons, hero, practice-area documents, forms and footer.
*/

/* ---------- Header ---------- */
.top-strip {
    background: var(--frame-blue);
    border-bottom: 1px solid var(--footer-border);
}

.top-strip a {
    transition: color 200ms ease;
}

.top-strip a:hover {
    color: var(--footer-text);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--frame-blue);
    border-bottom: 1px solid var(--footer-border);
}

.brand {
    display: inline-block;
}

.brand-kicker {
    display: block;
    font-family: var(--font-body);
    font-size: 0.63rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--footer-text-muted);
    margin-bottom: 0.3rem;
}

.brand-name {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.08rem;
    line-height: 1.2;
    color: var(--footer-text);
}

@media (min-width: 640px) {
    .brand-name {
        font-size: 1.28rem;
    }
}

.nav-link {
    display: inline-block;
    font-size: 0.73rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--footer-text-muted);
    padding-block: 0.4rem;
    border-bottom: 1px solid transparent;
    transition: color 200ms ease, border-color 200ms ease;
}

.nav-link:hover {
    color: var(--footer-text);
}

.nav-link[aria-current="page"] {
    color: var(--footer-text);
    border-bottom-color: var(--accent-color);
}

.menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--footer-border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--footer-text);
    cursor: pointer;
    transition: border-color 200ms ease, background 200ms ease;
}

.menu-button:hover {
    border-color: var(--footer-text-muted);
    background: rgba(247, 244, 238, 0.12);
}

.nav-mobile-link {
    display: block;
    padding-block: 0.95rem;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--footer-text-muted);
    border-bottom: 1px solid var(--footer-border);
    transition: color 200ms ease;
}

.nav-mobile-link:hover {
    color: var(--footer-text);
}

.nav-mobile-link[aria-current="page"] {
    color: var(--footer-text);
}

.nav-mobile-list > li:last-child .nav-mobile-link {
    border-bottom: 0;
}

/* ---------- Buttons ---------- */
.btn-ink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 2.9rem;
    padding: 0.7rem 1.9rem;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius);
    background: var(--primary-color);
    color: var(--on-primary-color);
    font-family: var(--font-body);
    font-size: 0.73rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 250ms ease, border-color 250ms ease, color 250ms ease;
}

.btn-ink:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--on-primary-color);
}

.btn-ink:disabled {
    opacity: 0.55;
    cursor: default;
}

/* ---------- Hero ---------- */
.hero-band {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    min-height: 26rem;
    background: var(--hero-background);
    border-bottom: 1px solid var(--border-color);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(250, 248, 244, 0.3) 0%, rgba(250, 248, 244, 0.92) 100%);
}

.hero-grid {
    display: grid;
    gap: 2.5rem;
    padding-block: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3.5rem;
        padding-block: 5rem;
    }

    .hero-copy {
        grid-column: 2;
        grid-row: 1;
    }

    .hero-quote-wrap {
        grid-column: 1;
        grid-row: 1;
        align-self: end;
        margin-top: 0;
        max-width: 42rem;
    }

    .hero-scrim {
        background: linear-gradient(90deg, rgba(250, 248, 244, 0.08) 0%, rgba(250, 248, 244, 0.55) 45%, rgba(250, 248, 244, 0.94) 100%);
    }
}

.hero-copy {
    max-width: 34rem;
}

.hero-photo-circle {
    position: relative;
    display: block;
    width: 280px;
    height: 280px;
    margin: 0 0 2rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--surface-color);
    box-shadow: 0 18px 40px rgba(18, 21, 26, 0.16);
}

.hero-photo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.9);
    transform-origin: center 3%;
}

@media (min-width: 640px) {
    .hero-photo-circle {
        width: 340px;
        height: 340px;
    }
}

@media (min-width: 1024px) {
    .hero-photo-circle {
        width: 380px;
        height: 380px;
    }
}

.hero-rule {
    width: 3.25rem;
    height: 1px;
    background: var(--hero-accent);
    margin-bottom: 1.9rem;
}

.hero-title {
    font-size: clamp(1.95rem, 1.15rem + 3.1vw, 3.4rem);
    font-weight: 500;
    line-height: 1.14;
    letter-spacing: -0.015em;
    color: var(--frame-blue);
}

.hero-name {
    margin-top: 0.75rem;
    font-family: var(--font-heading);
    font-size: clamp(1.15rem, 0.95rem + 1vw, 1.6rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.05em;
    color: var(--hero-accent);
}

.hero-sub {
    margin-top: 1.4rem;
    max-width: 42rem;
    font-size: 1.04rem;
    line-height: 1.65;
    color: var(--frame-blue);
}

.hero-quote-wrap {
    margin-top: 2.5rem;
    max-width: 34rem;
}

.hero-justitia {
    margin: 0;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(0.72rem, 0.55rem + 0.7vw, 1rem);
    line-height: 1.35;
    letter-spacing: 0.05em;
    color: var(--frame-blue);
    text-shadow: 0 1px 2px rgba(250, 248, 244, 0.9);
}

.hero-justitia-author {
    margin: 0.6rem 0 0;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(0.62rem, 0.5rem + 0.5vw, 0.82rem);
    letter-spacing: 0.05em;
    color: var(--frame-blue);
    text-shadow: 0 1px 2px rgba(250, 248, 244, 0.9);
}

/* ---------- Section labels and links ---------- */
.section-label,
.section-label-large {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.domain-link {
    font-size: 0.95rem;
    color: var(--text-color);
    border-bottom: 1px solid transparent;
    transition: color 200ms ease, border-color 200ms ease;
}

.domain-link:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.domain-grid {
    display: grid;
    gap: 0.9rem 2.75rem;
}

@media (min-width: 640px) {
    .domain-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .domain-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.domain-item {
    position: relative;
    padding-left: 1.15rem;
}

.domain-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-color);
}

/* ---------- Info rows ---------- */
.info-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.info-value {
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-value a {
    border-bottom: 1px solid var(--border-color);
    transition: color 200ms ease, border-color 200ms ease;
}

.info-value a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* ---------- Practice area documents ---------- */
.doc-list {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
}

.doc-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-top: 0.5rem;
    font-size: 0.94rem;
    line-height: 1.65;
}

.doc-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-color);
}

.doc-sublist {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
}

.doc-sublist li {
    position: relative;
    padding-left: 1.1rem;
    margin-top: 0.4rem;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.doc-sublist li::before {
    content: "–";
    position: absolute;
    left: 0;
    top: auto;
    width: auto;
    height: auto;
    background: none;
    color: var(--accent-color);
}

.doc-title {
    font-family: var(--font-heading);
    font-size: 1.22rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--accent-color);
}

@media (min-width: 640px) {
    .doc-title {
        font-size: 1.35rem;
    }
}

/* ---------- Forms ---------- */
.form-ink .fieldset-legend {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0;
    margin-bottom: 0.45rem;
}

.form-ink .input,
.form-ink .textarea {
    width: 100%;
    min-height: 2.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--input-background);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.6rem 0.85rem;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.form-ink .textarea {
    min-height: 9.5rem;
    resize: vertical;
    line-height: 1.6;
}

.form-ink .input:focus,
.form-ink .textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-note {
    font-size: 0.76rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.form-note a {
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-soft);
}

.form-status {
    font-size: 0.82rem;
    line-height: 1.5;
}

.form-status.is-success {
    color: var(--success-color);
}

.form-status.is-error {
    color: var(--error-color);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--footer-background);
    border-top: 1px solid var(--footer-background);
}

.footer-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--footer-text);
}

.footer-meta {
    font-size: 0.82rem;
    line-height: 1.8;
    color: var(--footer-text-muted);
}

.footer-meta a {
    border-bottom: 1px solid var(--footer-border);
    transition: color 200ms ease, border-color 200ms ease;
}

.footer-meta a:hover {
    color: var(--footer-text);
    border-bottom-color: var(--accent-color);
}

.footer-link {
    font-size: 0.82rem;
    color: var(--footer-text-muted);
    border-bottom: 1px solid transparent;
    transition: color 200ms ease, border-color 200ms ease;
}

.footer-link:hover {
    color: var(--footer-text);
    border-bottom-color: var(--accent-color);
}

/* ---------- Process steps ("Cum lucrăm") ---------- */
.process-label {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.process-label::before {
    content: "";
    flex: 0 0 auto;
    width: 3.25rem;
    height: 1px;
    background: var(--accent-color);
}

.process-list {
    position: relative;
    list-style: none;
    margin: 2.25rem 0 0;
    padding: 0 0 0 2.6rem;
    display: grid;
    gap: 2.4rem;
}

.process-list::before {
    content: "";
    position: absolute;
    left: 0.45rem;
    top: 0.7rem;
    bottom: 0.7rem;
    border-left: 1px dotted var(--accent-color);
    opacity: 0.7;
}

.process-number {
    display: block;
    margin-bottom: 0.7rem;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1;
    color: var(--accent-color);
}

.process-title {
    margin: 0 0 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.22rem;
    font-weight: 500;
    line-height: 1.3;
}

.process-text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.85;
    letter-spacing: 0.01em;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .process-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
        margin-top: 2.5rem;
        padding: 2rem 0 0;
    }

    .process-list::before {
        left: 0;
        right: 0;
        top: 0;
        bottom: auto;
        border-left: 0;
        border-top: 1px dotted var(--accent-color);
    }

    .process-number {
        font-size: 3rem;
    }

    .process-title {
        min-height: 2.6em;
    }
}

/* ---------- Justified reading text (Romanian) ---------- */
@media (min-width: 640px) {
    .read-justify {
        -webkit-hyphens: auto;
        hyphens: auto;
    }

    .read-justify p,
    .read-justify li,
    .read-justify dd,
    .read-justify dt {
        text-align: justify;
        -webkit-hyphens: auto;
        hyphens: auto;
        text-justify: inter-word;
    }
}

/* ---------- Practice areas band ---------- */
.domain-band {
    background: var(--frame-blue);
    border-top: 1px solid var(--frame-blue);
}

.domain-band .section-label {
    color: var(--footer-text);
}

.domain-band .domain-link {
    color: var(--footer-text);
}

.domain-band .domain-link:hover {
    color: var(--footer-text);
    border-bottom-color: var(--footer-text);
}

.domain-band .domain-item::before {
    background: var(--footer-text);
}

.domain-band .btn-ink {
    background: transparent;
    border-color: var(--footer-text);
    color: var(--footer-text);
}

.domain-band .btn-ink:hover {
    background: var(--footer-text);
    border-color: var(--footer-text);
    color: var(--frame-blue);
}

/* ---------- Menu button (mobile only) ---------- */
@media (min-width: 1024px) {
    .menu-button {
        display: none;
    }
}

/* ---------- About photo ---------- */
.about-photo {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    background: #a9a6a1;
}

.about-photo img {
    object-fit: cover;
    object-position: center;
    transform: none;
}

@media (min-width: 640px) {
    .about-photo {
        width: 260px;
        height: 260px;
        margin-left: 0;
        margin-right: 0;
    }
}

/* ---------- Table of contents (equal boxes) ---------- */
.toc-boxes {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .toc-boxes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .toc-boxes {
        grid-template-columns: repeat(3, 1fr);
    }
}

.toc-boxes > li {
    display: flex;
}

.toc-box {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 1.05rem 1.25rem;
    border: 1px solid var(--border-color);
    border-left: 2px solid var(--accent-color);
    border-radius: 4px;
    background: var(--input-background);
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--text-color);
    text-align: left;
    transition: border-color 200ms ease, background 200ms ease;
}

.toc-box:hover {
    border-color: var(--accent-color);
}

/* ---------- Back to contents link ---------- */
.back-to-contents {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid transparent;
    transition: color 200ms ease, border-color 200ms ease;
}

.back-to-contents:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* ---------- Circular portrait (About page) ---------- */
.portrait-frame {
    display: block;
    width: 260px;
    height: 260px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--frame-blue);
    box-shadow: 0 18px 40px rgba(18, 21, 26, 0.16);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* ---------- Portrait style variants (chooser) ---------- */
.variant-grid {
    display: grid;
    gap: 1.75rem 1.25rem;
    grid-template-columns: repeat(2, 1fr);
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .variant-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.variant-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.variant-frame {
    width: 100%;
    max-width: 220px;
    overflow: hidden;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 40px rgba(18, 21, 26, 0.16);
}

.variant-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.variant-1 {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.variant-2 {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
}

.variant-3 {
    aspect-ratio: 3 / 4;
    border-radius: 50% 50% 0 0 / 42% 42% 0 0;
}

.variant-4 {
    aspect-ratio: 3 / 4;
    border-radius: 52% 48% 45% 55% / 46% 54% 46% 54%;
}

.variant-caption {
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ---------- About: portrait beside the text ---------- */
.about-layout {
    display: grid;
    gap: 2.25rem;
}

.about-portrait {
    width: 280px;
    max-width: 100%;
    margin-inline: auto;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--surface-color);
    box-shadow: 0 18px 40px rgba(18, 21, 26, 0.16);
}

.about-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

@media (min-width: 768px) {
    .about-layout {
        grid-template-columns: 380px 1fr;
        gap: 3rem;
        align-items: start;
    }

    .about-portrait {
        width: 380px;
        margin-inline: 0;
    }
}