/* Birjoo — single-page site
   Breakpoints follow the original build: 1024 / 767 for layout,
   921 / 544 for the header, headings and buttons. */

:root {
    --gold: #e4cb86;
    --white: #ffffff;
    --text: #e2e2e2;
    --bg: #000000;
    --preloader-bg: #0a0a0a;
    --spinner: #00aacf;
    --container: 1200px;
    --glow: 0 0 40px 0 rgba(255, 255, 255, 0.6);
    --heading-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    line-height: 1.65;
    overflow-x: hidden;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, p, figure, ul {
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    padding: 12px 18px;
    background: var(--white);
    color: #000;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
}

/* ---------------------------------------------------------------------------
   Preloader
   ------------------------------------------------------------------------ */

.preloader {
    display: none;
}

.js .preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background: var(--preloader-bg);
    transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

.js .preloader.is-done {
    opacity: 0;
    visibility: hidden;
}

.is-loading,
.is-loading body {
    overflow: hidden;
}

.preloader__inner {
    margin: auto 0;
    padding: 40px;
    text-align: center;
}

.preloader__photo {
    display: inline-block;
    width: 300px;
    max-width: 100%;
    margin: 0 0 20px;
}

.preloader__photo img {
    display: block;
    width: 300px;
    height: auto;
    max-width: 100%;
}

.preloader__photo figcaption {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text);
    text-align: center;
}

/* A diamond that splits into four smaller diamonds and joins back up */
.spinner {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto;
}

.spinner span {
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--spinner);
    animation: spinner-split 1s ease-in-out infinite;
}

/* Each piece is a quarter of the 64px diamond: a 22px square turned 45deg,
   centred at the middle of each edge of the big shape. */
.spinner span:nth-child(1) { left: 21px; top: 5px;  --dx: 0;     --dy: -10px; }
.spinner span:nth-child(2) { left: 37px; top: 21px; --dx: 10px;  --dy: 0; }
.spinner span:nth-child(3) { left: 21px; top: 37px; --dx: 0;     --dy: 10px; }
.spinner span:nth-child(4) { left: 5px;  top: 21px; --dx: -10px; --dy: 0; }
@keyframes spinner-split {
    0%, 100% {
        transform: translate(0, 0) rotate(45deg) scale(1.03);
    }
    50% {
        transform: translate(var(--dx), var(--dy)) rotate(135deg) scale(0.9);
    }
}

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

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding-top: 8px;
}

.site-header__bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    max-width: var(--container);
    min-height: 70px;
    margin: 0 auto;
}

.main-nav {
    grid-column: 2;
}

.main-nav ul,
.mobile-menu ul,
.footer-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
}

.main-nav a {
    display: block;
    padding: 0 20px;
    font-size: 13px;
    font-weight: 600;
    line-height: 70px;
    text-transform: uppercase;
    color: var(--white);
    transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.is-current {
    color: var(--gold);
}

.header-button {
    grid-column: 3;
    justify-self: start;
    display: inline-block;
    margin-left: 20px;
    padding: 15px 23px;
    border: 1px solid var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--white);
    background: transparent;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.header-button:hover,
.header-button:focus-visible {
    color: #424242;
    background: var(--white);
}

.menu-toggle {
    display: none;
    grid-column: 3;
    justify-self: end;
    width: 39px;
    height: 39px;
    margin-right: 19px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--white);
    cursor: pointer;
}

.menu-toggle svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.6));
}

.menu-toggle__close,
.menu-toggle.is-open .menu-toggle__open {
    display: none;
}

.menu-toggle.is-open .menu-toggle__close {
    display: inline;
}

.mobile-menu {
    background: rgba(0, 0, 0, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-menu[hidden] {
    display: none;
}

.mobile-menu ul {
    flex-direction: column;
}

.mobile-menu li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu a:not(.header-button) {
    display: block;
    padding: 0 20px;
    font-size: 13px;
    font-weight: 600;
    line-height: 50px;
    text-transform: uppercase;
    color: var(--white);
}

.mobile-menu a.is-current,
.mobile-menu a:not(.header-button):hover {
    color: var(--gold);
}

.mobile-menu__button {
    padding: 15px 20px 20px;
}

.mobile-menu__button .header-button {
    margin-left: 0;
}

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

.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 100vh;
    min-height: 100svh; /* phones and tablets: the height without the browser's toolbars */
    background: var(--bg);
}

/* The photo fills the whole hero at any window shape, kept on his face. */
.hero__photo {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
}

/* Darkens the top behind the menu and fades the bottom into the black page,
   so the menu and the name stay readable whatever part of the photo shows. */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.4) 0,
        rgba(0, 0, 0, 0) 130px,
        rgba(0, 0, 0, 0) 62%,
        rgba(0, 0, 0, 0.7) 86%,
        #000 100%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto -80px;
}

.hero__title {
    margin-bottom: -31px;
    font-size: 80px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-transform: uppercase;
    color: var(--white);
}

.hero__subtitle {
    margin-bottom: -15px;
    padding: 0 240px;
    font-size: 30px;
    line-height: 1;
    text-align: center;
    text-shadow: var(--heading-shadow);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 10px;
}

.stat {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.stat__number {
    display: flex;
    font-size: 100px;
    font-weight: 600;
    line-height: 1;
    color: var(--gold);
}

.stat__prefix,
.stat__suffix {
    flex-grow: 1;
}

.stat__prefix {
    text-align: right;
}

.stat__suffix {
    text-align: left;
}

.stat__label {
    font-size: 30px;
    line-height: 1.5;
    text-shadow: var(--heading-shadow);
}

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

/* The 30px top padding matches the original: 10px of padding plus the
   20px gap below an (invisible) anchor at the top of each section. */
.section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: calc(var(--container) + 20px);
    margin: 0 auto;
    padding: 30px 10px 10px;
}

.section--social {
    margin-top: 50px;
}

.section__title {
    font-size: 40px;
    font-weight: 400;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
    color: var(--white);
}

.spacer--after-hero {
    height: 70px;
}

.spacer--section {
    height: 70px;
}

.spacer--about {
    height: 50px;
}

/* Social icons */

.social-grid {
    --icon-size: 85px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 5px;
    list-style: none;
    padding: 0;
}

.social-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(var(--icon-size) * 2);
    height: calc(var(--icon-size) * 2);
    border-radius: 10%;
    font-size: var(--icon-size);
    color: var(--white);
    transition: transform 0.3s;
}

.social-grid a:hover {
    transform: scale(1.1);
}

.social-grid i,
.social-grid img {
    display: block;
    width: 1em;
    height: 1em;
    line-height: 1;
    text-align: center;
}

/* About */

.about-text {
    font-size: 37px;
    line-height: 33px;
    letter-spacing: 1.2px;
    text-align: center;
    text-shadow: var(--heading-shadow);
}

.about-text p {
    margin-bottom: 1em;
}

.about-text strong a {
    font-weight: 700;
    color: var(--white);
    transition: color 0.2s;
}

.about-text strong a:hover {
    color: var(--gold);
}

/* Services */

.services {
    padding: 30px 0 120px;
}

/* Three cards fill a row exactly (30% + 5% + 30% + 5% + 30%); any extra cards
   added in the editor wrap onto a centred second row. */
.services__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 60px 5%;
    max-width: var(--container);
    margin: 0 auto;
}

.service-card {
    position: relative;
    overflow: hidden;
    width: 30%;
    border-radius: 10px;
    box-shadow: var(--glow);
}

.service-card__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    text-align: center;
}

.service-card__title,
.service-card__text {
    align-self: stretch;
}

.service-card__title {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--white);
}

.service-card__text {
    font-size: 16px;
    line-height: 1.65;
}

.service-card__text p {
    margin-bottom: 1em;
}

/* Waves behind the buttons, set up the way the original site's shape divider
   (Premium Addons for Elementor, GPL v3) did it: a 150px wave strip at the
   bottom of the card, enlarged 4x from its top-right corner and slid back and
   forth over 10 seconds, so the card shows a moving slice of a big wave. */
.service-card__waves {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    line-height: 0;
    overflow-x: hidden;
    pointer-events: none;
    transform: scale(4);
    transform-origin: 100% 0;
    animation: waves-sweep 10s linear infinite alternate;
}

.service-card__waves svg {
    position: relative;
    left: 50%;
    display: block;
    width: 101%;
    height: 150px;
    transform: translateX(-50%);
    fill: #afafaf;
    opacity: 0.3;
}

@keyframes waves-sweep {
    to { transform: scale(4) translateX(75%); }
}

.button {
    display: inline-block;
    padding: 15px 23px;
    border: 1px solid var(--white);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--white);
    background: transparent;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.button:hover,
.button:focus-visible {
    color: #000;
    background: var(--white);
}

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

.site-footer__main {
    padding: 104px 40px 64px;
    border-top: 1px solid rgba(227, 227, 227, 0.16);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    column-gap: 50px;
    align-items: center;
    max-width: var(--container);
    margin: 0 auto;
}

.footer-brand a {
    font-size: 22px;
    line-height: 1.5;
    text-transform: uppercase;
    color: var(--white);
}

/* Links never break inside ("Social / Media / Links"); if there isn't room,
   whole links move to a second row instead. */
.footer-nav ul {
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    display: block;
    padding: 0 24px;
    font-size: 15px;
    line-height: 26px;
    white-space: nowrap;
    color: var(--white);
    transition: color 0.2s;
}

.footer-nav a.is-current,
.footer-nav a:hover {
    color: var(--gold);
}

/* "Contact" and its icons on one line, lined up with the name and the menu,
   at the right edge (stacked and centred on smaller screens, below). */
.footer-contact {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
}

.footer-contact p {
    font-size: 16px;
    line-height: 26px;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    height: 26px;
}

.footer-social a {
    font-size: 18px;
    line-height: 1;
    color: var(--white);
    transition: color 0.2s;
}

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

.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 20px;
    font-size: 14px;
    text-align: center;
}

/* ---------------------------------------------------------------------------
   Tablet (up to 1024px)
   ------------------------------------------------------------------------ */

/* Medium screens: the footer menu gets the room it needs, and the name and
   contact columns share what's left. */
@media (min-width: 922px) and (max-width: 1199px) {
    .site-footer__inner {
        grid-template-columns: 1fr auto 1fr;
    }

    .footer-nav a {
        padding: 0 16px;
    }
}

@media (max-width: 1024px) {
    .hero {
        align-items: center;
        justify-content: flex-end;
        padding-top: 544px;
    }

    .hero__content {
        margin: 0;
        padding-top: 24px;
    }

    .hero__title {
        margin-bottom: -35px;
    }

    .hero__subtitle {
        margin-bottom: -2px;
        padding: 0;
        font-size: 22px;
    }

    /* -190px on the counters' wrapper plus -10px on the counters themselves */
    .stats {
        margin-bottom: -200px;
    }

    .stat__number {
        font-size: 48px;
    }

    .stat__label {
        font-size: 29px;
    }

    .social-grid {
        --icon-size: 51px;
    }

    .spacer--section {
        height: 39px;
    }

    .about-text {
        font-size: 22px;
        line-height: 1.1em;
        letter-spacing: 0.6px;
    }

    .spacer--about {
        height: 19px;
    }

    .services {
        padding: 90px 25px;
    }

    .service-card__body {
        padding: 10px;
    }

    .button {
        border-radius: 6px;
    }
}

/* ---------------------------------------------------------------------------
   Header, headings and buttons (up to 921px)
   ------------------------------------------------------------------------ */

@media (max-width: 921px) {
    .site-header {
        padding-top: 0;
    }

    .site-header__bar {
        grid-template-columns: 1fr auto;
    }

    .main-nav,
    .site-header__bar > .header-button {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        grid-column: 2;
    }

    .hero__title {
        font-size: 64px;
    }

    .section__title {
        font-size: 36px;
    }

    .service-card__title {
        font-size: 30px;
    }

    .service-card__text,
    .footer-contact p {
        font-size: 15px;
        line-height: 1.65;
    }

    .button,
    .header-button {
        padding: 13px 21px;
    }

    .site-footer__main {
        padding: 64px 40px 49px;
    }

    .footer-contact {
        display: block;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        row-gap: 10px;
        text-align: center;
    }

    .footer-brand a {
        line-height: 32px;
    }

    .footer-nav a {
        padding: 15.5px 24px;
    }
}

/* ---------------------------------------------------------------------------
   Mobile (up to 767px)
   ------------------------------------------------------------------------ */

@media (max-width: 767px) {
    .site-header {
        top: -9px;
    }

    .hero {
        min-height: 455px;
        margin-top: -9px;
        padding-top: 246px;
    }

    .hero__content {
        margin-bottom: -82px;
        padding-top: 0;
    }

    .hero__title {
        margin: 75px 0 -25px;
        font-size: 34px;
    }

    .hero__subtitle {
        margin: -1px 0 0;
        font-size: 16px;
    }

    .stats {
        margin: -16px 0 -15px;
    }

    .stat__number {
        font-size: 34px;
    }

    .stat__label {
        font-size: 13px;
    }

    .spacer--after-hero {
        height: 60px;
    }

    .menu-toggle {
        margin-top: 9px;
    }

    .section--social {
        margin-top: 0;
        padding: 20px 0 0;
    }

    .social-grid {
        --icon-size: 26px;
    }

    .spacer--section {
        height: 25px;
    }

    .about-text {
        margin: 0 5px;
        font-size: 14px;
        line-height: 1em;
        letter-spacing: 0;
        text-align: justify;
    }

    .spacer--about {
        display: none;
    }

    .services {
        padding: 30px 20px 50px;
    }

    .services__grid {
        flex-direction: column;
        gap: 55px;
    }

    .service-card {
        width: 100%;
    }

    .service-card__body {
        margin: 15px 0;
        padding: 0 5px;
    }
}

/* ---------------------------------------------------------------------------
   Small phones (up to 544px)
   ------------------------------------------------------------------------ */

@media (max-width: 544px) {
    .section__title {
        font-size: 32px;
    }

    .service-card__title {
        font-size: 24px;
    }

    .button,
    .header-button {
        padding: 11px 19px;
    }

    .footer-nav ul {
        flex-direction: column;
        align-items: center;
        margin: 10px 0 23px;
    }

    .footer-nav a {
        padding: 7.5px 0;
    }

    .site-footer__bottom {
        min-height: 101px;
    }
}

/* ---------------------------------------------------------------------------
   Screen shapes
   ------------------------------------------------------------------------ */

/* Tablets: three cards side by side are narrow, so the card titles shrink
   with the screen instead of breaking words in half. */
@media (min-width: 768px) and (max-width: 1024px) {
    .service-card__title {
        font-size: clamp(20px, 2.8vw, 30px);
    }
}

/* Phones and tablets held upright use the square / near-square photo: centre it. */
@media (max-width: 1024px) and (max-aspect-ratio: 5/4) {
    .hero__photo img {
        object-position: 50% 50%;
    }
}

/* Phones and tablets held sideways (and any window up to 1024px that is wider
   than it is tall): the name and the numbers sit at the bottom of the first
   screen instead of below it. */
@media (max-width: 1024px) and (min-aspect-ratio: 5/4) {
    .site-header {
        top: 0;
    }

    .hero {
        align-items: flex-end;
        min-height: 100vh;
        min-height: 100svh;
        margin-top: 0;
        padding-top: 0;
    }

    .hero__content {
        margin: 0 auto;
        padding: 80px 0 12px;
    }

    .hero__title {
        margin-top: 0;
    }

    .stats {
        margin: 0;
    }
}

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

    .spinner span,
    .service-card__waves {
        animation: none;
    }
}
