/* ==========================================================================
   Bil Awal | site styles
   Quiet luxury: ivory, forest green, charcoal, a trace of gold.
   ========================================================================== */

/* Tokens ------------------------------------------------------------------ */

:root {
    --forest: #0f2a1d;
    --forest-deep: #0a1f15;
    --forest-link: #1d5c3d;   /* readable green for text links (AA on paper) */
    --ivory: #f4f1ea;
    --paper: #fbfaf6;
    --ink: #151515;
    --charcoal: #2a2a28;
    --muted: #6b6860;
    --gold: #a8894e;          /* hairlines and ornaments */
    --gold-text: #7c6535;     /* small gold text on light grounds (AA) */
    --gold-light: #cbb27d;    /* gold text on forest green (AA) */
    --rule: rgba(21, 21, 21, 0.12);
    --rule-light: rgba(244, 241, 234, 0.16);

    --serif: "Cormorant Garamond", "Iowan Old Style", Garamond, Georgia, serif;
    --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

    --gutter: clamp(1.25rem, 4vw, 3rem);
    --max: 1320px;
    --section: clamp(6rem, 13vw, 11rem);
    --header-h: 4.5rem;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --slow: 900ms;
}

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

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

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

body {
    margin: 0;
    background: var(--ivory);
    color: var(--charcoal);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    /* Fill the screen so the footer always sits at the bottom; any spare
       height goes to the hero text (see .hero / .hero__text). */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

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

.skip-link {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--ink);
    color: var(--ivory);
    font-size: 0.8125rem;
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.container {
    width: 100%;
    max-width: calc(var(--max) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Type primitives --------------------------------------------------------- */

.eyebrow {
    font-family: var(--sans);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold-text);
}

/* Underline that draws in on hover */
.link {
    background: linear-gradient(currentColor, currentColor) no-repeat right bottom / 0 1px;
    padding-bottom: 0.15em;
    transition: background-size 600ms var(--ease), color 300ms var(--ease);
}
.link:hover,
.link:focus-visible {
    background-position: left bottom;
    background-size: 100% 1px;
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--header-h);
    border-bottom: 1px solid transparent;
    transition: background-color 500ms var(--ease), border-color 500ms var(--ease);
}

.site-header.is-scrolled {
    background: rgba(244, 241, 234, 0.94);
    border-bottom-color: var(--rule);
    -webkit-backdrop-filter: saturate(1.2) blur(10px);
    backdrop-filter: saturate(1.2) blur(10px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: calc(var(--max) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.monogram {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--ink);
}

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

.hero {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    background: var(--ivory);
    padding-top: calc(var(--header-h) + clamp(2rem, 5vw, 4.5rem));
}

.hero__text {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-inline: var(--gutter);
    padding-bottom: clamp(2.5rem, 5vw, 4.25rem);
    text-align: center;
}

.hero__title {
    margin-top: 1.1rem;
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(4rem, 11vw, 9.5rem);
    line-height: 0.88;
    letter-spacing: -0.025em;
    color: var(--ink);
}

.hero__tagline {
    margin-top: clamp(1rem, 2vw, 1.6rem);
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    font-weight: 300;
    letter-spacing: 0.01em;
    color: var(--muted);
}

.hero__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin-top: clamp(1.4rem, 2.6vw, 2.1rem);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    color: var(--charcoal);
}

.hero__divider {
    width: 1.75rem;
    height: 1px;
    background: var(--gold);
}

/* The film runs the full width of the page at its native 16:9 proportions,
   so nothing is cropped. */
.hero__media {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--forest-deep);
}

.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
    transition: opacity 1.2s var(--ease);
}

/* With JS, hold the film back until it is actually playing, so YouTube's
   thumbnail and play button never flash on screen. */
.js .hero__video:not(.is-playing) { opacity: 0; }

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

.site-footer {
    background: var(--paper);
    color: var(--charcoal);
}

.site-footer__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: clamp(2.25rem, 6vw, 5rem);
    padding-bottom: clamp(1rem, 2vw, 1.25rem);
}

.footer-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--ink);
}

.footer-mark__monogram {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: var(--forest);
    color: var(--gold-light);
    font-family: var(--serif);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.footer-mark__rule {
    width: 1px;
    height: 2.4rem;
    background: var(--gold);
}

.footer-mark__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.footer-mark__eyebrow {
    font-size: 0.5625rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold-text);
}

.footer-mark__name {
    margin-top: 0.25rem;
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 500;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-social a {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--ink);
    transition: color 300ms var(--ease);
}

.footer-social a:hover { color: var(--forest-link); }

.site-footer__bottom { border-top: 1px solid var(--rule); }

.site-footer__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding-block: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.5rem, 3vw, 2.25rem);
}

.site-footer__copy {
    font-size: 0.8125rem;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.75rem;
}

.footer-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--forest-link);
    text-underline-offset: 4px;
    transition: color 300ms var(--ease);
}

.footer-links a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--gold);
}

/* Reveal on scroll (only when JS is running) ------------------------------ */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

.hero [data-reveal]:nth-child(2) { transition-delay: 80ms; }
.hero [data-reveal]:nth-child(3) { transition-delay: 180ms; }
.hero [data-reveal]:nth-child(4) { transition-delay: 280ms; }

/* Responsive -------------------------------------------------------------- */

@media (max-width: 639px) {
    :root { --header-h: 4rem; }

    .monogram { font-size: 1.3rem; }

    .hero__contact { flex-direction: column; gap: 0.75rem; }

    .site-footer__bar { flex-direction: column; align-items: flex-start; }
    .footer-social { margin-right: -0.75rem; }
}

/* Motion preferences ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }

    .js [data-reveal] { opacity: 1; transform: none; }
}
