/* WhibDev Consulting site styles. Brand: near-black #1a1a1a, accent #be3e1d, Open Sans + Rambla. */

:root {
    --ink: #1a1a1a;
    --ink-2: #262626;
    --ink-3: #303030;
    --line-dark: #3a3a3a;
    --text: #2b2b2b;
    --text-muted: #4a4a4a;
    --text-soft: #555555;
    --on-dark: #ffffff;
    --on-dark-muted: #c8c8c8;
    --accent: #be3e1d;
    --accent-dark: #a8371a;
    --accent-darker: #732512;
    --accent-light: #f08a6c;
    --grey-bg: #f5f5f4;
    --line: #e3e3e1;
    --field-border: #8f8f8b;
    --error: #b42318;
    --radius: 12px;
    --font-body: "Open Sans", Helvetica, Arial, sans-serif;
    --font-display: "Rambla", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

body {
    margin: 0;
    background: #ffffff;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
}

img, svg { max-width: 100%; }

a { color: var(--accent-dark); }
a:hover { color: var(--accent-darker); }

h1, h2 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.15; margin-bottom: 16px; }

h3 { margin: 0 0 8px; font-size: 21px; color: var(--ink); }

p { margin: 0; }

:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }

.container { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 10;
    background: #ffffff;
    color: var(--ink);
    padding: 10px 16px;
    border-radius: 6px;
}
.skip-link:focus { top: 12px; }

.eyebrow {
    margin-bottom: 8px;
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.eyebrow--light { color: var(--accent-light); margin-bottom: 16px; }

.muted { color: var(--text-soft); }

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 28px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #ffffff;
    font: 700 16px/1.2 var(--font-body);
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--accent-dark); color: #ffffff; }
.button--small { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.button--ghost { background: transparent; border: 1px solid #5a5a5a; font-weight: 600; }
.button--ghost:hover { background: var(--ink-2); }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */

.site-header { background: var(--ink); border-bottom: 3px solid var(--accent); transition: background-color 0.3s ease-out, box-shadow 0.3s ease-out; }
.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    padding-bottom: 18px;
    transition: padding 0.3s ease-out;
}
.site-header__logo { display: flex; align-items: center; min-height: 44px; }
.site-header__logo img { display: block; width: 188px; height: auto; transition: width 0.3s ease-out; }
.site-nav .button { transition: background-color 0.15s, min-height 0.3s ease-out, padding 0.3s ease-out, font-size 0.3s ease-out; }

/* Once the page scrolls, the header sticks to the top, turns a lighter grey and shrinks
   (js/header.js adds .is-scrolled). Back at the top it is the full header again.
   The scrolled header is 63px tall, so nav links land just below it. */
html { scroll-padding-top: 63px; }
.site-header { position: sticky; top: 0; z-index: 10; }
.site-header.is-scrolled { background: var(--ink-3); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); }
.site-header.is-scrolled .site-header__inner { padding-top: 8px; padding-bottom: 8px; }
.site-header.is-scrolled .site-header__logo img { width: 150px; }
.site-header.is-scrolled .site-nav .button { min-height: 38px; padding: 7px 16px; font-size: 14px; }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.site-nav a:not(.button) {
    color: #e6e6e6;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 14px;
}
.site-nav a:not(.button):hover { color: #ffffff; }
.site-nav .button { margin-left: 8px; }

/* Below 768px the links move into a menu that drops down under the header (js/header.js opens it). */
.site-nav-toggle { display: none; }
@media (max-width: 767px) {
    .site-header__inner { flex-wrap: nowrap; }
    .site-nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 11px 10px;
        margin-right: -10px;
        background: none;
        border: 0;
        cursor: pointer;
    }
    .site-nav-toggle__bar { display: block; height: 2px; background: #ffffff; border-radius: 1px; transition: transform 0.2s ease-out, opacity 0.2s ease-out; }
    .site-header.nav-open .site-nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .site-header.nav-open .site-nav-toggle__bar:nth-child(2) { opacity: 0; }
    .site-header.nav-open .site-nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .site-nav {
        display: none;
        position: absolute;
        top: calc(100% + 3px); /* below the header's accent border */
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 24px 24px;
        background: var(--ink);
        border-bottom: 3px solid var(--accent);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    }
    .site-header.is-scrolled .site-nav { background: var(--ink-3); }
    .site-header.nav-open .site-nav { display: flex; }
    .site-nav a:not(.button) { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line-dark); }
    .site-nav .button,
    .site-header.is-scrolled .site-nav .button { margin: 20px 0 0; min-height: 48px; padding: 12px 20px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .site-header, .site-header__inner, .site-header__logo img, .site-nav .button, .site-nav-toggle__bar { transition: none; }
}

/* Hero */

/* Fills the first screen below the header (83px tall when the nav fits on one line). */
.hero {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 83px);
    min-height: calc(100svh - 83px);
    background: var(--ink);
    color: var(--on-dark);
}
.hero__inner {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 56px;
    padding-top: 88px;
    padding-bottom: 96px;
}
.hero__copy { flex: 999 1 520px; min-width: 0; }
.hero h1 {
    color: var(--on-dark);
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.08;
    margin-bottom: 24px;
}
.hero__lead { max-width: 600px; margin-bottom: 36px; color: #d0d0d0; font-size: 20px; }

.hero__art { flex: 1 1 380px; min-width: 0; position: relative; height: 380px; }
.app-window {
    position: absolute;
    left: 0;
    top: 10px;
    right: 40px;
    height: 300px;
    background: var(--ink-2);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    overflow: hidden;
}
.app-window__bar { height: 34px; background: #2f2f2f; display: flex; align-items: center; gap: 8px; padding: 0 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #5a5a5a; }
.dot--accent { background: var(--accent); }
.app-window__body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.app-window__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.app-window__tiles span { height: 50px; border-radius: 8px; background: var(--ink-3); }
.app-window__chart {
    height: 150px;
    border-radius: 8px;
    background: var(--ink-3);
    padding: 14px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.app-window__chart span { flex: 1; border-radius: 3px; background: #4a4a4a; }
.app-window__chart .is-accent { background: var(--accent); }

.assistant-card {
    position: absolute;
    right: 0;
    top: 120px;
    width: 250px;
    max-width: 80%;
    background: var(--ink-3);
    border: 1px solid #4a4a4a;
    color: #f0f0f0;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    line-height: 1.45;
}
.assistant-card__title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--accent-light); }
.assistant-card__question { align-self: flex-end; background: #3d3d3d; border-radius: 10px; padding: 8px 12px; }
.assistant-card__answer { background: #4a2a20; border-radius: 10px; padding: 8px 12px; }

/* Sections */

.section { padding: 64px 0; }
/* The sections the nav links to each fill the screen they jump to. */
#services, #process, #about, #contact {
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
}
#services > .container, #process > .container, #about > .container, #contact > .container { width: 100%; }
/* The header sticks, so they fill the screen below its 63px scrolled height. */
#services, #process, #about, #contact { min-height: calc(100vh - 63px); min-height: calc(100svh - 63px); }
.section--grey { background: var(--grey-bg); }
.section__lead { max-width: 720px; margin-bottom: 36px; color: var(--text-soft); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.card { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; }
.card__icon { display: block; margin-bottom: 18px; color: var(--accent); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 16px; }

.steps {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.steps__item { border-top: 3px solid #d3d3d0; padding-top: 18px; }
.steps__item--active { border-top-color: var(--accent); }
.steps__item h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 4px; }
.steps__item p { color: var(--text-muted); font-size: 16px; }

.split { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 56px; }
.split__intro { flex: 1 1 320px; min-width: 0; }

/* "Practical, responsible AI": a dark panel under the How we work steps. */
.ai-panel {
    margin-top: 48px;
    padding: 40px;
    background: var(--ink);
    color: var(--on-dark);
    border-radius: var(--radius);
}
.ai-panel__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 36px);
    line-height: 1.15;
    color: var(--on-dark);
    margin-bottom: 12px;
}
.ai-panel .split__intro p { color: var(--on-dark-muted); }

.principles {
    flex: 999 1 560px;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.principle { background: var(--ink-2); border: 1px solid #333333; border-radius: var(--radius); padding: 24px; }
.principle h4 { margin: 0 0 6px; font-size: 17px; color: var(--on-dark); }
.principle p { color: var(--on-dark-muted); font-size: 15px; }

.values { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.values p { color: var(--text-muted); }

/* Contact */

.contact { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.form-panel {
    flex: 999 1 520px;
    min-width: 0;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-panel--success h3 { margin-bottom: 8px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; color: var(--ink); }
.field__optional { font-weight: 400; color: #666666; }
.field input, .field textarea {
    font: inherit;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--field-border);
    border-radius: 6px;
}
.field input { height: 48px; padding: 0 14px; }
.field textarea { padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--accent-light); outline-offset: 0; border-color: var(--accent); }
.field .input-validation-error { border-color: var(--error); }
.field__error { color: var(--error); font-size: 14px; }
.field__error:empty { display: none; }
.field--hidden { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-alert { border: 1px solid #f1b8b0; background: #fdf0ee; color: var(--error); border-radius: 8px; padding: 12px 16px; font-size: 15px; }
.form-alert ul { margin: 4px 0 0; padding-left: 20px; }
.validation-summary-valid { display: none; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.form-note { font-size: 14px; color: #666666; }

.contact-card {
    flex: 1 1 300px;
    min-width: 0;
    background: var(--ink);
    color: var(--on-dark);
    border-radius: var(--radius);
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.contact-card h3 { margin: 0; font-family: var(--font-display); font-size: 26px; color: var(--on-dark); }
.contact-card__item { display: flex; gap: 14px; align-items: flex-start; }
.contact-card__item svg { flex: 0 0 22px; margin-top: 3px; color: var(--accent-light); }
.contact-card__item a { color: #ffffff; font-weight: 600; }
.contact-card__label { color: #b5b5b5; font-size: 14px; }
.contact-card__value { font-weight: 600; }

/* Footer */

.site-footer { background: var(--ink); color: #b5b5b5; border-top: 3px solid var(--accent); }
.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 32px;
}
.site-footer__about { flex: 1 1 320px; min-width: 0; max-width: 460px; font-size: 15px; }
.site-footer__about img { display: block; width: 160px; height: auto; margin-bottom: 16px; }
.site-footer__links { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.site-footer__links a, .site-footer__links span { padding: 6px 0; }
.site-footer a { color: #e6e6e6; text-decoration: none; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }
.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-top: 20px;
    padding-bottom: 28px;
    border-top: 1px solid #333333;
    font-size: 14px;
}

@media (max-width: 600px) {
    .hero__inner { padding-top: 56px; padding-bottom: 64px; gap: 40px; }
    .hero__art { height: 340px; }
    .form-panel, .contact-card, .ai-panel { padding: 24px; }
}
