/* ==========================================================================
   Basin Supply Kuwait - style.css
   Design tokens, reset, base typography, layout primitives
   ========================================================================== */

:root {
    /* Brand - sampled from the BSK logo and the existing site template */
    --primary-color: #6d1e17;   /* oxblood - BASIN wordmark */
    --primary-dark:  #43120e;
    --primary-ink:   #2e0d0a;
    --primary-tint:  #fbefee;
    --accent-color:  #d85145;   /* ember */

    /* Accent sampled from BSK workshop photography (induction flame / test benches) */
    --quench:        #2e7fb8;
    --quench-dark:   #1f5c88;

    /* Neutrals */
    --dark-color:    #12100f;
    --dark-soft:     #1c1917;
    --graphite:      #3a3634;
    --text-color:    #2b2725;
    --text-muted:    #6e7378;
    --border-color:  #dcdedd;
    --border-strong: #c3c7c7;
    --light-color:   #f4f5f6;
    --paper:         #ffffff;

    /* Type */
    --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
    --font-body:    "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono:    "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

    /* Type scale */
    --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.83rem);
    --step-0:  clamp(0.95rem, 0.92rem + 0.15vw, 1.03rem);
    --step-1:  clamp(1.1rem, 1.04rem + 0.3vw, 1.3rem);
    --step-2:  clamp(1.35rem, 1.24rem + 0.55vw, 1.75rem);
    --step-3:  clamp(1.7rem, 1.48rem + 1.1vw, 2.5rem);
    --step-4:  clamp(2.15rem, 1.7rem + 2.2vw, 4rem);

    /* Space */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;

    /* Structure */
    --container: 1200px;
    --gutter: clamp(1.15rem, 4vw, 3rem);
    --radius: 2px;
    --header-h: 84px;
    --header-h-compact: 66px;

    --shadow-sm: 0 1px 2px rgba(18, 16, 15, 0.06), 0 2px 8px rgba(18, 16, 15, 0.04);
    --shadow-md: 0 2px 4px rgba(18, 16, 15, 0.06), 0 12px 28px rgba(18, 16, 15, 0.09);
    --shadow-lg: 0 10px 40px rgba(18, 16, 15, 0.16);

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --dur: 260ms;
}

/* --------------------------------------------------------------- reset -- */

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 { margin: 0 0 var(--space-4); }
p, ul, ol, table { margin: 0 0 var(--space-5); }
p:last-child, ul:last-child, table:last-child { margin-bottom: 0; }

a {
    color: var(--primary-color);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--dur) var(--ease);
}
a:hover { color: var(--accent-color); }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--quench);
    outline-offset: 3px;
    border-radius: var(--radius);
}

/* ---------------------------------------------------------- typography -- */

h1, h2 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--dark-color);
    text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }

h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    color: var(--dark-color);
}
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

.eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--step--1);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin: 0 0 var(--space-3);
}

.lede {
    font-size: var(--step-1);
    line-height: 1.55;
    color: var(--graphite);
    max-width: 62ch;
}

.prose { max-width: 68ch; }
.prose ul { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 1.6rem; margin-bottom: var(--space-3); }
.prose li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 0.6rem;
    height: 2px;
    background: var(--primary-color);
}

.text-mono { font-family: var(--font-mono); }

.u-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- layout -- */

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

.section { padding-block: clamp(3.25rem, 7vw, 6rem); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--light { background: var(--light-color); }
.section--dark { background: var(--dark-color); color: #d7d4d2; }
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: #fff; }
.section--dark .eyebrow { color: #d1a49f; }
.section > .container { position: relative; z-index: 1; }

.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--content {
    grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -100px;
    z-index: 200;
    background: var(--primary-color);
    color: #fff;
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-mono);
    font-size: var(--step--1);
    text-decoration: none;
    transition: top 160ms var(--ease);
}
.skip-link:focus { top: var(--space-4); color: #fff; }

/* ---------------------------------------------- signature: spec plate -- */
/* Section headings are set like an equipment ID plate: mono label, segmented
   gauge rule in oxblood + ember + quench, then a condensed caps title.       */

.plate { margin-bottom: clamp(1.75rem, 3.5vw, 3rem); max-width: 74ch; }
.plate__rule { display: flex; gap: 4px; margin-bottom: var(--space-4); }
.plate__rule span { height: 3px; width: 26px; background: var(--primary-color); }
.plate__rule span:nth-child(2) { width: 12px; background: var(--accent-color); }
.plate__rule span:nth-child(3) { width: 6px; background: var(--quench); }
.plate__title { margin-bottom: var(--space-3); text-transform: uppercase; }
.plate--center { margin-inline: auto; text-align: center; }
.plate--center .plate__rule { justify-content: center; }

/* Ghosted BSK silhouette watermark (rigs / pumpjack) */
.watermark {
    position: absolute;
    pointer-events: none;
    opacity: 0.07;
    z-index: 0;
}
.watermark--right { right: 2%; bottom: 0; width: min(300px, 26vw); }

/* ---------------------------------------------------------- animation -- */

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 90ms; }
.reveal[data-delay="2"] { transition-delay: 180ms; }
.reveal[data-delay="3"] { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
