/* =========================================================================
   BASE.CSS
   Foundation styles for the Webshape interview test theme:
   variables, fonts, reset, typography, layout containers, buttons,
   the site header and the site footer.
   Block-specific styles live in blocks.css.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Fonts
   ---------------------------------------------------------------------- */
@font-face {
    font-family: 'Play';
    src: url('../fonts/Play-Regular.woff2') format('woff2'),
         url('../fonts/Play-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Play';
    src: url('../fonts/Play-Bold.woff2') format('woff2'),
         url('../fonts/Play-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* -------------------------------------------------------------------------
   Variables
   ---------------------------------------------------------------------- */
:root {
    --main: #bd0064;            /* Primary brand colour */
    --main-dark: #93004e;       /* Primary hover */
    --contrast: #1d71b8;        /* Secondary / links */
    --dark-contrast: #274970;   /* Dark headings / footer */
    --text: #333333;            /* Body text */
    --dark-grey: #8d98a5;       /* Muted text */
    --border-grey: #e3e8f0;     /* Borders / dividers */
    --light-grey: #f9fafc;      /* Light section background */
    --background-grey: #f9fafc; /* Alt background */
    --review-star: #ffb339;     /* Star rating colour */
    --error: #f25f57;
    --white: #ffffff;

    --font-family: 'Play', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --container-width: 1100px;
    --section-padding: 64px;
    --radius: 12px;
}

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

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

body {
    margin: 0;
    background-color: var(--white);
    color: var(--text);
    font-family: var(--font-family);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
}

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

/* -------------------------------------------------------------------------
   Typography
   ---------------------------------------------------------------------- */
h1, h2, h3, h4 {
    margin: 0 0 0.5em;
    color: var(--dark-contrast);
    font-weight: 700;
    line-height: 1.2;
}
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 21px; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--main);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.25s ease;
}
a:hover { color: var(--main-dark); }

ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
li { margin-bottom: 6px; }

/* -------------------------------------------------------------------------
   Layout containers
   ---------------------------------------------------------------------- */
.body-container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.body-section {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
}
.body-section.grey { background-color: var(--light-grey); }
.body-section.dark { background-color: var(--dark-contrast); color: var(--white); }
.body-section.dark h1,
.body-section.dark h2,
.body-section.dark h3 { color: var(--white); }

/* Two-column grid used by blocks */
.columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.columns.reverse .column-media { order: 2; }
.columns.reverse .column-content { order: 1; }

/* -------------------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------------- */
.button-holder {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
}
.button-holder.left { justify-content: flex-start; }

.main-button {
    display: inline-block;
    padding: 12px 26px;
    border: 2px solid var(--main);
    border-radius: var(--radius);
    background: var(--main);
    color: var(--white);
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.main-button:hover {
    background: var(--white);
    color: var(--main);
}
.main-button.alt {
    background: transparent;
    color: var(--main);
}
.main-button.alt:hover {
    background: var(--main);
    color: var(--white);
}
.main-button.dark {
    background: var(--dark-contrast);
    border-color: var(--dark-contrast);
    color: var(--white);
}
.main-button.dark:hover {
    background: transparent;
    color: var(--dark-contrast);
}

/* -------------------------------------------------------------------------
   Site header
   ---------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border-grey);
}
.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.header-logo-link { display: inline-flex; align-items: center; }
.brand-logo { max-height: 48px; width: auto; }
.brand-logo-text {
    font-weight: 700;
    font-size: 22px;
    color: var(--dark-contrast);
}
.main-nav { display: flex; align-items: center; gap: 24px; }

/* -------------------------------------------------------------------------
   Site footer
   ---------------------------------------------------------------------- */
.site-footer {
    background: var(--dark-contrast);
    color: var(--white);
}
.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 40px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.footer-logo-link { display: inline-flex; align-items: center; }
.footer-brand-logo { max-height: 44px; width: auto; }
.footer-nav { display: flex; align-items: center; gap: 20px; }
.footer-copyright {
    padding: 18px 24px;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

/* -------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------- */
@media screen and (max-width: 767px) {
    body { font-size: 16px; }
    :root { --section-padding: 44px; }

    .columns { grid-template-columns: 1fr; gap: 28px; }
    .columns.reverse .column-media,
    .columns.reverse .column-content { order: 0; }

    .footer-inner { flex-direction: column; text-align: center; }
}
