/*
 * FEDRO GAUDENZI — bespoke tailoring, Cork Street.
 *
 * The register is the house's own campaign: black-and-white chiaroscuro.
 * Soot ground, bone type, basting-stitch dashed rules, chalk-outline
 * numerals for the ten steps. Everything is written in logical properties so
 * the Arabic mirror lays itself out.
 */

:root {
    --soot: #fafaf8;
    --soot-2: #efeeeb;
    --bone: #161512;
    --bone-soft: #736e66;
    --thread: #c2372b;
    --stitch: rgba(22, 21, 18, 0.22);
    --true-black: #121110;
    --true-bone: #ece7dc;
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'Archivo', 'Helvetica Neue', sans-serif;
    --pad: clamp(1.3rem, 5.5vw, 5.5rem);
}

/* The Arabic mirror swaps the faces, keeps the darkness. */
[lang='ar'] {
    --serif: 'Amiri', serif;
    --sans: 'IBM Plex Sans Arabic', sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--soot);
    color: var(--bone);
    font-family: var(--sans);
    font-weight: 300;
    font-size: clamp(0.98rem, 1.2vw, 1.1rem);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- lettering -- */

.label {
    font-family: var(--sans);
    font-weight: 400;
    font-size: 0.64rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--bone-soft);
}

[lang='ar'] .label { letter-spacing: 0.1em; }

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

.display {
    font-size: clamp(2.1rem, 5.2vw, 4.6rem);
    font-weight: 300;
    letter-spacing: -0.01em;
}

.display i, .lede i { font-style: italic; }
[lang='ar'] .display i, [lang='ar'] .lede i { font-style: normal; }

.lede {
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2.2vw, 1.9rem);
    font-weight: 300;
    line-height: 1.45;
    max-width: 30em;
}

.body-soft { color: var(--bone-soft); max-width: 40em; }

/* Basting stitch: the house divider. */
.stitch { border: 0; border-block-start: 1px dashed var(--stitch); margin: 0; }

.qlink {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.64rem;
    font-weight: 400;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--bone);
    padding-block-end: 0.5em;
    border-block-end: 1px dashed color-mix(in srgb, var(--thread) 55%, transparent);
    transition: border-color 0.4s ease;
}

.qlink:hover { border-color: var(--thread); }

[lang='ar'] .qlink { letter-spacing: 0.08em; }

/* ---------------------------------------------------------------- header -- */

.site-head {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    padding: clamp(0.9rem, 2vw, 1.4rem) var(--pad);
    background: color-mix(in srgb, var(--soot) 86%, transparent);
    backdrop-filter: blur(8px);
    border-block-end: 1px dashed var(--stitch);
}

.site-head .logo img { height: clamp(14px, 1.7vw, 19px); width: auto; }

.site-head nav { display: flex; gap: clamp(1rem, 2.4vw, 2.4rem); align-items: center; }

.nav-link {
    font-family: var(--sans);
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--bone-soft);
    transition: color 0.3s ease;
}

[lang='ar'] .nav-link { letter-spacing: 0.06em; font-size: 0.78rem; }

.nav-link:hover, .nav-link[aria-current='page'] { color: var(--bone); }

.lang-switch {
    display: flex;
    gap: 0.9rem;
    padding-inline-start: clamp(1rem, 2.4vw, 2.4rem);
    border-inline-start: 1px dashed var(--stitch);
}

.lang-switch a {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: var(--bone-soft);
}

.lang-switch a[aria-current='true'] { color: var(--bone); }

.menu-btn { display: none; background: none; border: 0; padding: 0.4rem 0; color: var(--bone); cursor: pointer; }

.sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: var(--soot);
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 1.2rem var(--pad) 2.4rem;
    transform: translateY(-103%);
    transition: transform 0.65s cubic-bezier(0.76, 0, 0.24, 1);
}

.sheet.is-open { transform: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-links { display: grid; align-content: center; gap: clamp(0.9rem, 3vh, 1.8rem); }

.sheet-links a {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.9rem, 8.5vw, 3rem);
    line-height: 1.12;
}

.sheet-foot { display: flex; gap: 1.6rem; }

/* ------------------------------------------------------------------ hero -- */

.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-content: end;
    padding: var(--pad);
    padding-block-start: 30vh;
    overflow: hidden;
}

.hero .bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

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

.hero .bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--soot) 6%, rgba(250, 250, 248, 0.55) 26%, transparent 55%);
}

.hero--dark { color: var(--true-bone); }

.hero--dark .bg::after {
    background: linear-gradient(to top, rgba(18, 17, 16, 0.88) 4%, transparent 52%),
        linear-gradient(to bottom, rgba(18, 17, 16, 0.35), transparent 30%);
}

.hero--dark .label { color: rgba(236, 231, 220, 0.75); }

.hero-kicker { margin-block-end: 1.4rem; }

.hero .display { max-width: 13em; }

.hero-row {
    margin-block-start: clamp(1.8rem, 5vh, 3rem);
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1.4rem, 4vw, 4rem);
    align-items: center;
}

/* ------------------------------------------------------------------ flow -- */

.act { padding: clamp(4.5rem, 11vh, 9rem) var(--pad); position: relative; }
.act--flush { padding-block: 0; }

/* Vertical rail label, mirrored automatically in RTL. */
.rail {
    position: absolute;
    inset-block-start: clamp(4.5rem, 11vh, 9rem);
    inset-inline-start: calc(var(--pad) * 0.32);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

[dir='rtl'] .rail { transform: none; }

.two {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
}

.two--flip { grid-template-columns: 1.1fr 0.9fr; }

.frame { overflow: hidden; background: var(--soot-2); }

.frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 1s ease;
}

.frame:hover img { transform: scale(1.03); }

.r34 { aspect-ratio: 3 / 4; }
.r45 { aspect-ratio: 4 / 5; }
.rwide { aspect-ratio: 16 / 9; }

/* Clip reveal: cloth being uncovered, not a fade. */
.reveal { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.is-in { clip-path: inset(0 0 0 0); }

.reveal-t { opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal-t.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-t { clip-path: none; opacity: 1; transform: none; transition: none; }
}

/* The numbers strip. */
.figures {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-block: 1px dashed var(--stitch);
}

.figures > div {
    padding: clamp(1.4rem, 3.5vh, 2.6rem) 1rem;
    text-align: center;
    display: grid;
    gap: 0.5rem;
}

.figures > div + div { border-inline-start: 1px dashed var(--stitch); }

.figure-num {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.6rem, 3.4vw, 2.8rem);
    line-height: 1;
}

/* Services list */
.services { display: grid; }

.service {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: clamp(1.2rem, 4vw, 3.5rem);
    padding: clamp(1.6rem, 4vh, 2.6rem) 0;
    border-block-start: 1px dashed var(--stitch);
    transition: padding 0.4s ease;
}

.service:last-child { border-block-end: 1px dashed var(--stitch); }

.service-index {
    font-family: var(--serif);
    font-style: italic;
    color: var(--thread);
    font-size: 1rem;
}

.service h3 { font-size: clamp(1.35rem, 2.6vw, 2.2rem); font-weight: 300; }
.service p { color: var(--bone-soft); max-width: 34em; margin: 0.5em 0 0; font-size: 0.95rem; }

/* Chalk-outline numerals for the process. */
.step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(1.4rem, 5vw, 4.5rem);
    padding-block: clamp(2rem, 5vh, 3.4rem);
    border-block-start: 1px dashed var(--stitch);
    align-items: start;
}

.step-num {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(3.2rem, 8vw, 6.4rem);
    line-height: 0.9;
    color: transparent;
    -webkit-text-stroke: 1.2px var(--thread);
    min-width: 2ch;
    text-align: center;
}

.step h3 { font-size: clamp(1.2rem, 2.2vw, 1.8rem); font-weight: 350; margin-block-end: 0.4em; }
.step p { color: var(--bone-soft); max-width: 44em; font-size: 0.95rem; }

/* Full-bleed band */
.band { position: relative; height: clamp(420px, 82vh, 800px); overflow: hidden; }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.band--fixed img { opacity: 0.9; }

.band-caption {
    position: absolute;
    inset-block-end: clamp(1.2rem, 4vh, 2.4rem);
    inset-inline-start: var(--pad);
    background: var(--soot);
    color: var(--bone);
    padding: 0.7em 1.1em;
}

/* Timeline (the story) */
.era {
    display: grid;
    grid-template-columns: minmax(84px, auto) 1fr;
    gap: clamp(1.4rem, 4vw, 3.5rem);
    padding-block: clamp(1.8rem, 4.5vh, 2.8rem);
    border-block-start: 1px dashed var(--stitch);
}

.era-year { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--thread); }
.era h3 { font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 350; margin-block-end: 0.35em; }
.era p { color: var(--bone-soft); max-width: 46em; font-size: 0.95rem; }

/* Visit card */
.visit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.6rem, 4vw, 4rem); }

.visit-cell { display: grid; gap: 0.55rem; align-content: start; padding-block-start: 1.4rem; border-block-start: 1px dashed var(--stitch); }

.visit-cell .big { font-family: var(--serif); font-size: clamp(1.15rem, 1.9vw, 1.55rem); font-weight: 300; }

/* ---------------------------------------------------------------- footer -- */

.site-foot {
    background: var(--true-black);
    color: var(--true-bone);
    padding: clamp(3rem, 8vh, 5.5rem) var(--pad) clamp(1.6rem, 4vh, 2.6rem);
    margin-block-start: clamp(4.5rem, 11vh, 9rem);
}

.site-foot .foot-links a, .site-foot .foot-links span { color: rgba(236, 231, 220, 0.62); }
.site-foot .foot-links a:hover { color: var(--true-bone); }
.site-foot .foot-line { border-block-start: 1px dashed rgba(236, 231, 220, 0.25); }
.site-foot .foot-line span { color: rgba(236, 231, 220, 0.5); }

.band + .site-foot, .flush + .site-foot { margin-block-start: 0; }

.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); }

.foot-links { display: grid; gap: 0.8rem; align-content: start; }

.foot-links a, .foot-links span {
    font-family: var(--sans);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--bone-soft);
}

[lang='ar'] .foot-links a, [lang='ar'] .foot-links span { letter-spacing: 0.05em; font-size: 0.85rem; }

.foot-links a:hover { color: var(--bone); }

.foot-logo img { height: 16px; width: auto; opacity: 0.9; }

.foot-line {
    margin-block-start: clamp(2.4rem, 6vh, 4rem);
    padding-block-start: 1.4rem;
    border-block-start: 1px dashed var(--stitch);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

.foot-line span { font-size: 0.6rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--bone-soft); }

[lang='ar'] .foot-line span { letter-spacing: 0.05em; font-size: 0.75rem; }

/* --------------------------------------------------------------- mobile ---- */

@media (max-width: 900px) {
    .site-head nav.primary { display: none; }
    .menu-btn { display: block; }
    .two, .two--flip, .foot-grid, .visit-grid { grid-template-columns: 1fr; }
    .figures { grid-template-columns: 1fr 1fr; }
    .figures > div:nth-child(3) { border-inline-start: 0; }
    .figures > div:nth-child(n+3) { border-block-start: 1px dashed var(--stitch); }
    .rail { display: none; }
    .service { grid-template-columns: auto 1fr; }
    .service .qlink { grid-column: 2; justify-self: start; }
    .hero .display { max-width: none; }
    .step { gap: 1.2rem; }
}
