/* ==========================================================
   CONTACT HERO  — two stacked zones inside one 100vh view:
   UPPER  = the oversized "Contact" wordmark, centred both ways,
            with a hairline divider (2rem inset) on its lower edge.
   LOWER  = eyebrow + a 2-line section heading on the LEFT and a
            4-line supporting paragraph on the RIGHT, sitting on
            the bottom padding (2rem).
   Letter + line reveals: /js/contact-hero-animations.js
========================================================== */

.contact-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    box-sizing: border-box;
    padding: 0 2rem 2rem;
}

/* UPPER ZONE — takes every pixel the statement below does not, and
   centres the wordmark in it on both axes (same as the About hero). */
.contact-hero__top {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    /* border-bottom: 1px solid rgba(255, 255, 255, 0.14); */
}

.contact-hero__word {
    margin: 0;
    /* tight leading + no descenders makes the glyphs sit visually high in
       their box — nudge down so it reads centred between header and line */
    transform: translateY(0.06em);
    font-family: "degular", sans-serif;
    font-size: clamp(3.25rem, 22vw, 22rem);
    line-height: 0.86;
    font-weight: var(--dz-heading-weight);
    letter-spacing: -0.02em;
    color: var(--dz-fg);
    white-space: nowrap;
    text-align: center;
}

/* LOWER ZONE — heading left, paragraph right, sitting on the 2rem
   bottom padding. Only as tall as its own content, so the wordmark
   above keeps the whole of the remaining height to centre in. */
.contact-hero__statement {
    flex: 0 0 auto;
    width: 100%;
    padding-top: clamp(2rem, 7vh, 4.5rem);
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: clamp(2rem, 7vw, 7rem);
    text-align: left;
}

.contact-hero__col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.contact-hero__eyebrow.dz-eyebrow {
    margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

/* section-sized heading — copy + max-width tuned to wrap to 2 lines */
/* shared page-hero scale from main.css — identical on every page */
.contact-hero__heading {
    margin: 0;
    max-width: 20ch;

    font-family: var(--dz-font-display);
    font-size: var(--dz-page-hero-size);
    line-height: var(--dz-page-hero-line);
    font-weight: var(--dz-heading-weight);
    letter-spacing: var(--dz-heading-tracking);
    color: var(--dz-heading-color);
}

/* supporting copy — right column, ~4 lines, sits on the heading's baseline */
.contact-hero__para {
    flex: 0 1 44ch;
    max-width: 44ch;
    margin: 0 0 0.35em;

    font-family: var(--dz-font-body);
    font-size: var(--dz-body-size);
    line-height: var(--dz-body-line);
    color: var(--dz-body-color);
}

@media (max-width: 820px) {
    .contact-hero__statement {
        flex-direction: column;
        align-items: flex-start;
        gap: clamp(1.5rem, 5vw, 2.5rem);
    }

    .contact-hero__heading {
        max-width: 24ch;
    }

    .contact-hero__para {
        flex-basis: auto;
        max-width: 52ch;
        margin-bottom: 0;
    }
}


/* ==========================================================
   CONTACT SECTION  — intro (left) + form (right), no cards.
   LEFT  = eyebrow, display heading and a short invite at the
           top; the phone / email / address strip pinned to the
           bottom, level with the Send Message bar.
   RIGHT = underline-only fields in a 2-up grid, a full-width
           message field, and a full-width white submit bar.

   Validation, the Services dropdown and the sent state all live
   in /js/contact.js → initForm(). It hooks #contactForm, .field,
   .field__error, [data-select] and .contact-btn, so those names
   are load-bearing — keep them if this markup changes.
========================================================== */

.contact-main {
    --contact-line:   rgba(var(--dz-fg-rgb), 0.16);   /* field underlines */
    --contact-line-2: rgba(var(--dz-fg-rgb), 0.45);   /* hover / focus underline */
    --contact-muted:  rgba(var(--dz-fg-rgb), calc(0.38 + var(--dz-text-lift)));   /* placeholders */
    --contact-error:  #ff5c4d;

    width: 100%;
    padding: 3rem;
    box-sizing: border-box;

    /* frames the section off the hero above and the FAQ below —
       full-bleed, the same tone as the hero divider */
    border-top: 1px solid rgba(var(--dz-fg-rgb), 0.14);
    border-bottom: 1px solid rgba(var(--dz-fg-rgb), 0.14);
}

/* ~37 / 63 split. Both columns stretch to the taller one, which is
   what lets the details strip and the submit bar share a bottom edge. */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: stretch;
}


/* ==========================================================
   LEFT — INTRO + DETAILS
========================================================== */

.contact-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

/* the gap down to the first detail group */
.contact-intro__eyebrow.dz-eyebrow {
    margin-bottom: clamp(2rem, 3.5vw, 2.75rem);
}

/* same scale as every page hero heading (tokens in main.css) */
.contact-intro__heading {
    margin: 0;

    font-family: var(--dz-font-display);
    font-size: var(--dz-page-hero-size);
    line-height: var(--dz-page-hero-line);
    font-weight: var(--dz-heading-weight);
    letter-spacing: var(--dz-heading-tracking);
    color: var(--dz-heading-color);
}

.contact-intro__para {
    max-width: 30ch;
    margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;

    font-family: var(--dz-font-body);
    font-size: clamp(1.1rem, 1.45vw, 1.5rem);
    line-height: 1.4;
    color: var(--dz-body-color);
}

/* Phone / Email / Address — one stacked list directly under the
   eyebrow, open space between groups, no dividers. */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: clamp(1.75rem, 3vw, 2.5rem);

    margin: 0;
}

.contact-info dt {
    margin-bottom: 0.65rem;

    font-family: var(--dz-font-body);
    font-size: 0.85rem;
    font-weight: var(--dz-regular-weight);
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
    color: rgba(var(--dz-fg-rgb), calc(0.6 + var(--dz-text-lift)));
}

.contact-info dd {
    margin: 0;

    font-family: var(--dz-font-body);
    font-size: clamp(1rem, 1.1vw, 1.1rem);
    line-height: 1.35;
    color: rgba(var(--dz-fg-rgb), calc(0.72 + var(--dz-text-lift)));
}

.contact-info dd a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
}

.contact-info dd a:hover {
    color: var(--dz-fg);
}


/* ==========================================================
   RIGHT — FORM
========================================================== */

.contact-form {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* paired fields — Name / Email, Company / Service */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 5.5vw, 6.5rem);
}

.field {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-bottom: clamp(2rem, 3.6vw, 3.25rem);
}

/* the label is the field's headline; the placeholder sits under it */
.field > label {
    margin-bottom: 0.3rem;

    font-family: var(--dz-font-body);
    font-size: clamp(1.1rem, 1.35vw, 1.4rem);
    font-weight: var(--dz-medium-weight);
    line-height: 1.2;
    color: var(--dz-fg);
    cursor: pointer;
}

/* the "·" after a required label — the input's own `required`
   attribute is what assistive tech announces */
.field .req {
    margin-left: 0.1em;
    color: var(--dz-fg);
}

/* underline-only: no box, no fill, no side padding, so the text
   lines up flush with the label above it */
.field input,
.field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0 0 0.9rem;

    font-family: var(--dz-font-body);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--dz-fg);

    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--contact-line);
    border-radius: 0;
    outline: none;

    transition: border-color 0.25s ease;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--contact-muted);
}

.field input:hover,
.field textarea:hover {
    border-bottom-color: rgba(var(--dz-fg-rgb), 0.28);
}

.field input:focus,
.field textarea:focus {
    border-bottom-color: var(--contact-line-2);
}

/* autofill would otherwise paint a pale box behind the text */
.field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--dz-bg) inset;
    -webkit-text-fill-color: var(--dz-fg);
    caret-color: var(--dz-fg);
}

/* the tall open field the mock shows under "What's On Your Mind?" */
.field textarea {
    min-height: clamp(8rem, 12vw, 11rem);
    resize: vertical;
}


/* ==========================================================
   SERVICES DROPDOWN  — themed listbox, no native <select>
   markup: .dz-select > button + <ul role="listbox"> + hidden input
   behaviour: js/contact.js → initServiceSelect()
========================================================== */

/* static, so the menu and the chevron both position against the
   whole .field (label included) rather than the value line alone */
.field--select .dz-select {
    position: static;
}

.dz-select__toggle {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 0 0 0.9rem;

    font-family: var(--dz-font-body);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    color: var(--dz-fg);

    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--contact-line);
    border-radius: 0;
    cursor: pointer;

    transition: border-color 0.25s ease;
}

.dz-select__toggle:hover {
    border-bottom-color: rgba(var(--dz-fg-rgb), 0.28);
}

.dz-select.is-open .dz-select__toggle,
.dz-select__toggle:focus-visible {
    border-bottom-color: var(--contact-line-2);
    outline: none;
}

.dz-select__value[data-placeholder] {
    color: var(--contact-muted);
}

/* the chevron sits on the label's line, hard right, as in the mock */
.dz-select__toggle i {
    position: absolute;
    top: 0;
    right: 0;

    font-size: clamp(1.25rem, 1.5vw, 1.5rem);
    line-height: 1;
    color: rgba(var(--dz-fg-rgb), calc(0.55 + var(--dz-text-lift)));

    transition: transform 0.25s ease, color 0.25s ease;
}

.dz-select__toggle:hover i,
.dz-select.is-open .dz-select__toggle i {
    color: var(--dz-fg);
}

.dz-select.is-open .dz-select__toggle i {
    transform: rotate(180deg);
}

.dz-select__menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.35rem;
    list-style: none;

    background: var(--dz-surface-1);
    border: 1px solid var(--contact-line);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.dz-select.is-open .dz-select__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dz-select__option {
    padding: 0.75rem 0.85rem;

    font-family: var(--dz-font-body);
    font-size: 0.95rem;
    color: rgba(var(--dz-fg-rgb), calc(0.7 + var(--dz-text-lift)));
    cursor: pointer;

    transition: background-color 0.18s ease, color 0.18s ease;
}

.dz-select__option:hover,
.dz-select__option.is-active {
    background: rgba(var(--dz-fg-rgb), 0.07);
    color: var(--dz-fg);
}

.dz-select__option[aria-selected="true"] {
    color: var(--dz-accent);
}


/* ---- VALIDATION ---- */

.field__error {
    display: none;
    margin-top: 0.5rem;

    font-family: var(--dz-font-body);
    font-size: 0.8rem;
    color: var(--contact-error);
}

.field.error input,
.field.error textarea,
.field.error .dz-select__toggle {
    border-bottom-color: var(--contact-error);
}

.field.error .field__error {
    display: block;
}


/* ==========================================================
   SEND BUTTON  — full-width bar, label left, arrow right.
   At rest it is plain white text on the page's black over a
   hairline, like the fields above it. On hover white sweeps in
   from the left and the text flips to black to sit on it — the
   same move as the footer bar button.
========================================================== */

.contact-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    width: 100%;
    margin-top: auto;          /* sits on the column's bottom edge */
    padding: clamp(1.1rem, 1.9vw, 1.6rem) clamp(1.1rem, 1.6vw, 1.4rem);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    /* same type as the footer's Start Project bar (.button-footer) */
    font-family: var(--dz-font-button);
    font-size: 18px;
    font-weight: var(--dz-medium-weight);
    line-height: 1.2;
    text-align: left;
    color: var(--dz-fg);

    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--contact-line);
    border-radius: 0;
    cursor: pointer;

    transition: color 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

.contact-btn:hover,
.contact-btn:focus-visible {
    color: var(--dz-bg);
}

.contact-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background: var(--dz-fg);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.contact-btn:hover::before,
.contact-btn:focus-visible::before {
    transform: scaleX(1);
}

.contact-btn:focus-visible {
    outline: 1px solid var(--dz-fg);
    outline-offset: 3px;
}

.contact-btn i {
    flex-shrink: 0;
    font-size: 1.15em;         /* the footer bar's arrow ratio */
    line-height: 1;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-btn:hover i,
.contact-btn:focus-visible i {
    transform: translateX(4px);
}

/* while "Sending…" the fill is withdrawn, so the text must stay white
   even under the pointer or it would vanish black-on-black */
.contact-btn:disabled {
    cursor: default;
    color: var(--dz-fg);
}

.contact-btn:disabled::before {
    transform: scaleX(0);
}


/* ==========================================================
   SUCCESS STATE
========================================================== */

.success-message {
    display: none;
    align-items: center;
    gap: 0.85rem;

    font-family: var(--dz-font-body);
    font-size: 1.1rem;
    color: rgba(var(--dz-fg-rgb), calc(0.85 + var(--dz-text-lift)));
}

.success-message i {
    font-size: 1.5rem;
    color: var(--dz-success);
}

.contact-form.is-sent .form-row,
.contact-form.is-sent .field,
.contact-form.is-sent .contact-btn {
    display: none;
}

.contact-form.is-sent .success-message {
    display: flex;
    margin: auto 0;
}


/* ==========================================================
   RIGHT — STUDIO VISUAL  (markup commented out in contact.html;
   the new layout has no slot for it)
========================================================== */

.contact-visual {
    position: relative;
    min-height: 88vh;
    overflow: hidden;
}

.contact-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

/* stacked: details first, then the form */
@media (max-width: 1024px) {
    .contact-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: clamp(3rem, 8vw, 4rem);
    }

    .contact-btn {
        margin-top: 0.5rem;
    }
}

@media (max-width: 560px) {
    /* the hero narrows with the form so both share one left edge,
       like the About hero on phones */
    .contact-hero,
    .contact-main {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .form-row {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* ==========================================================
   FAQ
========================================================== */


.faq-label {
    display: inline-block;
    margin-bottom: 2rem;
    font-size: .82rem;
    letter-spacing: .32em;
    color: rgba(var(--dz-fg-rgb), calc(.65 + var(--dz-text-lift)));
    text-transform: uppercase;
}

.contact-faq{
    width:100%;
    padding:4rem 2rem;    /* 4rem top + bottom, matching the contact section */
    box-sizing:border-box;
}

.faq-title{
    max-width:980px;
    margin:0 0 3.2rem;
      font-family: "degular", sans-serif;
    font-size: var(--dz-section-size);
    line-height: var(--dz-section-line);
    font-weight: var(--dz-heading-weight);
    letter-spacing: var(--dz-heading-tracking);
    color: var(--dz-fg);
}

.faq-list{
    border-top:1px solid rgba(var(--dz-fg-rgb), .12);
}

.faq-item{
    border-bottom:1px solid rgba(var(--dz-fg-rgb), .12);
}

.faq-header{

    min-height:75px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:2rem;

    cursor:pointer;

    user-select:none;

}

.faq-header span{

    font-size:1.25rem;

    line-height:1.45;

    font-weight:var(--dz-medium-weight);

    color:rgba(var(--dz-fg-rgb), calc(.7 + var(--dz-text-lift)));

    transition:.35s;

}

.faq-header i{

    flex-shrink:0;

    font-size:1.35rem;

    color:rgba(var(--dz-fg-rgb), calc(.35 + var(--dz-text-lift)));

    transition:.35s;

}

.faq-item:hover .faq-header span,
.faq-item.active .faq-header span{

    color:var(--dz-fg);

}

.faq-item:hover .faq-header i,
.faq-item.active .faq-header i{

    color:var(--dz-fg);

}

/* ===================================== */

.faq-answer{
    height:0;
    overflow:hidden;
    will-change:height;
}

.faq-content{

    max-width:760px;

    padding:12px 0 12px;

}

.faq-content p{

    margin:0;

    font-size:1rem;

    line-height:1.9;

    color:rgba(var(--dz-fg-rgb), calc(.62 + var(--dz-text-lift)));

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width: 1024px){

    .contact-faq{

        padding:4rem 2rem;

    }

    .faq-title{

        font-size:3.5rem;

        margin-bottom:2.5rem;

    }

    .faq-header{

        min-height:70px;

    }

    .faq-header span{

        font-size:1.05rem;

    }

    .faq-content{

        padding:0 0 1.6rem;

    }

}

@media(max-width:540px){

    .contact-faq{

        width:92%;

        padding:4rem 0;

    }

    .faq-title{

        font-size:3rem;

    }

    .faq-header{

        gap:1rem;

    }

    .faq-header span{

        font-size:1rem;

        line-height:1.5;

    }

    .faq-header i{

        font-size:1.2rem;

    }

}


/* ==========================================================
   PHONE  (≤ 767px) — shared mobile system from main.css
   · "Contact" runs gutter to gutter (3.32em measured width)
   · hero, form and FAQ all sit on the one 1.25rem gutter
     (the FAQ used to shrink to 92% and lose its left edge)
========================================================== */

@media (max-width: 1024px){

    .contact-hero{
        min-height:100svh;
        padding:0 var(--dz-gutter) 1.75rem;
    }

    .contact-hero__word{
        font-size:calc((100vw - 2 * var(--dz-gutter)) / 3.32);
    }

    .contact-main{
        padding:var(--dz-section-py) var(--dz-gutter);
    }

    .form-row{
        grid-template-columns:minmax(0, 1fr);
    }

    .contact-faq{
        width:100%;
        padding:var(--dz-section-py) var(--dz-gutter);
    }

    .faq-title{
        font-size:clamp(2.5rem, 12vw, 3rem);
        line-height:1;
    }

}