/* ==========================================================
   SUGi Hair
   Ivory, metallic gold lettering, ultra-luxury minimalism.
   ========================================================== */

:root {
    --ivory: #F8F4EA;
    --ivory-deep: #F0E9D8;
    --ink: #3A3128;
    --ink-soft: #5B5043;

    /* Gold, from darkest to lightest */
    --gold-deep: #6E5222;
    --gold-text: #7A5B22;   /* solid gold for small text, 5:1 on ivory */
    --gold-mid: #94702A;
    --gold-light: #C9A64F;

    --line: rgba(122, 91, 34, 0.28);

    --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --gutter: clamp(1.5rem, 6vw, 6rem);
    --header-height: 5rem;
}

/* ---------- Base ---------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ivory);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 300;
    line-height: 1.1;
}

p {
    margin: 0 0 1.25rem;
}

img {
    display: block;
    max-width: 100%;
}

/* Missing photos are hidden by the page so the placeholder shows cleanly. */
img[hidden] {
    display: none;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--gold-deep);
    outline-offset: 4px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 20;
    padding: 0.6rem 1rem;
    background: var(--ivory);
    color: var(--gold-deep);
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
}

/* ---------- Metallic gold lettering ---------- */

.gold-text {
    width: fit-content;
    color: var(--gold-text);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .gold-text {
        background-image: linear-gradient(
            100deg,
            var(--gold-deep) 0%,
            var(--gold-mid) 35%,
            var(--gold-light) 50%,
            var(--gold-mid) 65%,
            var(--gold-deep) 100%
        );
        background-size: 100% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
}

/* One sheen across the hero headline on load, then it rests. */
.sheen {
    background-size: 260% 100%;
    background-position: 25% 0;
    animation: sheen 3s ease-out 0.3s both;
}

@keyframes sheen {
    from { background-position: 100% 0; }
    to   { background-position: 25% 0; }
}

/* ---------- Shared type ---------- */

.eyebrow {
    margin: 0 0 1.25rem;
    font-family: var(--sans);
    font-weight: 400;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: var(--gold-text);
}

.lede {
    max-width: 34rem;
    color: var(--ink-soft);
}

h2 {
    font-size: clamp(2.1rem, 4.5vw, 3.5rem);
    letter-spacing: -0.005em;
}

h3 {
    font-size: 1.65rem;
    font-weight: 500;
}

/* ---------- Header ---------- */

.header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: var(--header-height);
    padding: 0 var(--gutter);
    background: rgba(248, 244, 234, 0.94);
    border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(8px)) {
    .header {
        background: rgba(248, 244, 234, 0.82);
        backdrop-filter: blur(8px);
    }
}

.logo {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.7rem;
    letter-spacing: 0.1em;
    line-height: 1;
    text-decoration: none;
}

.header nav {
    display: flex;
    gap: clamp(1.25rem, 3vw, 2.75rem);
}

.header nav a {
    position: relative;
    padding: 0.35rem 0;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--gold-text);
    text-decoration: none;
}

.header nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--gold-text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.header nav a:hover::after,
.header nav a:focus-visible::after {
    transform: scaleX(1);
}

/* ---------- Sections ---------- */

main > section {
    padding: clamp(5rem, 12vw, 10rem) var(--gutter);
}

.section-header {
    margin-bottom: clamp(3rem, 7vw, 5.5rem);
    text-align: center;
}

.section-header .gold-text {
    margin-inline: auto;
}

/* ---------- Frames (image slots) ----------
   The soft ivory-gold gradient shows until a photo is added. */

.frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: linear-gradient(160deg, #F3ECDA 0%, #E7DABC 100%);
}

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

/* ---------- Hero ---------- */

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: clamp(2.5rem, 7vw, 7rem);
    min-height: calc(100svh - var(--header-height));
    padding-block: clamp(3rem, 6vw, 5rem);
}

.hero h1 {
    font-size: clamp(3.3rem, 8vw, 7.5rem);
    line-height: 1.02;
    letter-spacing: -0.015em;
}

.hero-rule {
    display: block;
    width: 5rem;
    height: 1px;
    margin: clamp(1.75rem, 3vw, 2.75rem) 0;
    background: var(--gold-mid);
    transform-origin: left;
    animation: draw 1.4s ease 0.2s both;
}

@keyframes draw {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

.hero .lede {
    margin-bottom: 2.5rem;
}

.hero-image {
    max-height: 78svh;
    justify-self: end;
    width: 100%;
}

/* ---------- Buttons ---------- */

.gold-button {
    display: inline-block;
    padding: 0.95rem 2.5rem;
    border: 1px solid var(--gold-text);
    border-radius: 0;
    background: transparent;
    color: var(--gold-text);
    font-family: var(--sans);
    font-weight: 400;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.gold-button:hover,
.gold-button:focus-visible {
    background: var(--gold-deep);
    border-color: var(--gold-deep);
    color: var(--ivory);
}

/* ---------- Collection ---------- */

.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 4vw, 4.5rem);
    max-width: 78rem;
    margin: 0 auto;
}

.product {
    text-align: center;
}

.product h3 {
    margin: 1.75rem auto 0.6rem;
}

.product p {
    max-width: 22rem;
    margin-inline: auto;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

/* ---------- Philosophy ---------- */

.philosophy {
    background: var(--ivory-deep);
    text-align: center;
}

.philosophy-inner {
    max-width: 46rem;
    margin: 0 auto;
}

.philosophy .gold-text {
    margin: 0 auto 2rem;
}

.philosophy .lede {
    max-width: none;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    line-height: 1.6;
    color: var(--ink);
}

/* ---------- Feature ---------- */

.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(2.5rem, 8vw, 8rem);
    max-width: 82rem;
    margin: 0 auto;
}

.feature-image {
    aspect-ratio: 3 / 4;
}

.feature-content {
    max-width: 28rem;
}

.feature-content .gold-text {
    margin-bottom: 2rem;
}

.feature-content p:not(.eyebrow) {
    color: var(--ink-soft);
}

/* ---------- Ritual ---------- */

.ritual-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 4vw, 4.5rem);
    max-width: 70rem;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.step {
    padding-top: 2.5rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

.step-number {
    display: inline-block;
    margin-bottom: 1rem;
    font-family: var(--serif);
    font-weight: 300;
    font-size: 3.25rem;
    line-height: 1;
}

.step h3 {
    margin: 0 auto 0.75rem;
}

.step p {
    max-width: 18rem;
    margin-inline: auto;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

/* ---------- Newsletter ---------- */

.newsletter {
    text-align: center;
    border-top: 1px solid var(--line);
}

.newsletter .gold-text {
    margin: 0 auto 1.75rem;
}

.newsletter .lede {
    margin-inline: auto;
    margin-bottom: 2.75rem;
}

.newsletter-form {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    max-width: 34rem;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 0.1rem;
    border: 0;
    border-bottom: 1px solid var(--gold-text);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
}

.newsletter-form input::placeholder {
    color: var(--ink-soft);
    opacity: 0.8;
}

.newsletter-form input:focus-visible {
    outline: none;
    box-shadow: 0 1px 0 var(--gold-deep);
    border-bottom-color: var(--gold-deep);
}

.form-status {
    min-height: 1.75rem;
    margin: 1.25rem 0 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

/* ---------- Footer ---------- */

.footer {
    padding: clamp(4rem, 8vw, 6rem) var(--gutter) 3rem;
    border-top: 1px solid var(--line);
    text-align: center;
    color: var(--ink-soft);
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer-logo {
    margin: 0 auto 1rem;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 2rem;
    letter-spacing: 0.1em;
    line-height: 1.1;
}

.contact-link {
    color: var(--gold-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.3em;
}

.contact-link:hover {
    color: var(--gold-deep);
}

.footer small {
    display: block;
    margin-top: 2.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

/* ---------- Collections page ---------- */

.header nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

.page-intro {
    padding-bottom: 0;
    text-align: center;
}

.page-intro h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    letter-spacing: -0.01em;
}

/* Product names are h2 on the collections page, h3 on the home page. */
.product h2 {
    margin: 1.75rem auto 0.6rem;
    font-size: 1.65rem;
    font-weight: 500;
}

.page-intro .gold-text {
    margin: 0 auto 1.75rem;
}

.page-intro .lede {
    margin-inline: auto;
    margin-bottom: 0;
}

.product .ritual-note {
    margin: 1.25rem 0 0;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.ritual-note a {
    color: var(--gold-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.3em;
}

.ritual-note a:hover {
    color: var(--gold-deep);
}

/* ---------- Contact pop-up ---------- */

body.modal-open {
    overflow: hidden;
}

.contact-dialog {
    width: min(34rem, calc(100vw - 2rem));
    max-height: calc(100svh - 2rem);
    margin: auto;
    padding: 0;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--ivory);
    color: var(--ink);
}

.contact-dialog[open] {
    animation: dialog-in 0.25s ease both;
}

.contact-dialog::backdrop {
    background: rgba(58, 49, 40, 0.5);
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.contact-form {
    position: relative;
    padding: clamp(1.75rem, 5vw, 3rem);
}

.contact-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    padding: 0.35rem 0;
    border: 0;
    background: none;
    color: var(--gold-text);
    font-family: var(--sans);
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.3em;
    cursor: pointer;
}

.contact-close:hover {
    color: var(--gold-deep);
}

.contact-form h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.contact-form .lede {
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
}

.field {
    margin-bottom: 1.25rem;
}

.field label {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--gold-text);
}

.field .optional {
    margin-left: 0.4rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
}

.field input,
.field textarea {
    display: block;
    width: 100%;
    padding: 0.6rem 0.1rem;
    border: 0;
    border-bottom: 1px solid var(--gold-text);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
}

.field textarea {
    min-height: 7rem;
    resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
    outline: none;
    box-shadow: 0 1px 0 var(--gold-deep);
    border-bottom-color: var(--gold-deep);
}

.form-actions {
    margin-top: 1.75rem;
}

.submit-button {
    padding: 0.7rem 2.1rem;
    border: 1px solid var(--gold-deep);
    border-radius: 0;
    background: var(--gold-deep);
    color: var(--ivory);
    font-family: var(--sans);
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    line-height: 1.2;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.submit-button:hover,
.submit-button:focus-visible {
    background: var(--gold-text);
    border-color: var(--gold-text);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: default;
}

.contact-status {
    min-height: 1.75rem;
    margin: 1.25rem 0 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

/* ---------- Tablet and below ---------- */

@media (max-width: 900px) {

    .hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .hero-image {
        justify-self: start;
        max-width: 28rem;
        max-height: none;
    }

    .products,
    .ritual-steps {
        grid-template-columns: 1fr;
        max-width: 26rem;
    }

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

    .feature-image {
        max-width: 28rem;
    }
}

/* ---------- Phones ---------- */

@media (max-width: 600px) {

    :root {
        --header-height: 6.5rem;
    }

    .header {
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
        padding-block: 0.9rem;
    }

    .header nav {
        gap: 1.4rem;
    }

    .newsletter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    /* Keep the whole contact form, Submit included, on one phone screen. */
    .contact-form {
        padding: 1.5rem;
    }

    .contact-form h2 {
        margin-bottom: 0.5rem;
    }

    .contact-form .lede {
        margin-bottom: 1.25rem;
    }

    .field {
        margin-bottom: 0.8rem;
    }

    .field input,
    .field textarea {
        padding-block: 0.4rem;
    }

    .field textarea {
        min-height: 4.5rem;
    }

    .form-actions {
        margin-top: 1.25rem;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .sheen,
    .hero-rule {
        animation: none;
    }

    .header nav a::after,
    .gold-button,
    .submit-button {
        transition: none;
    }

    .contact-dialog[open] {
        animation: none;
    }
}
