/* CAL Projects Limited — shared website foundation (Phase 01B prototypes) */

@font-face { font-family: "Playfair Display"; src: url("../fonts/playfair-display.woff") format("woff"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/playfair-display-italic.woff") format("woff"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat.woff") format("woff"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Approved brand colours */
  --navy: #0A131E;
  --gold: #B58944;
  --cream: #F7F3ED;
  --stone: #8F8881;
  /* Supporting surfaces */
  --ink: #07090D;
  --charcoal: #13171D;
  --charcoal-2: #1B2027;
  --cream-2: #EEE8DF;
  /* Derived */
  --gold-line: rgba(181, 137, 68, 0.38);
  --gold-faint: rgba(181, 137, 68, 0.14);
  --cream-80: rgba(247, 243, 237, 0.82);
  --cream-60: rgba(247, 243, 237, 0.62);
  --cream-line: rgba(247, 243, 237, 0.12);
  --navy-70: rgba(10, 19, 30, 0.74);
  --navy-line: rgba(10, 19, 30, 0.14);

  --serif: "Playfair Display", "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
  --step-3: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  --step-4: clamp(2.3rem, 1.6rem + 2.8vw, 3.8rem);
  --step-5: clamp(2.8rem, 1.8rem + 4.4vw, 5.4rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; font-family: var(--sans); font-size: var(--step-0); line-height: 1.7; font-weight: 400; color: var(--cream); background: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -0.005em; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--gold); color: var(--ink); padding: .6rem 1rem; font-weight: 600; }
.skip-link:focus { top: 1rem; }

/* Small tracked label — used sparingly, as in the approved profile */
.label { font-family: var(--sans); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3.1rem; padding: 0 1.6rem; font: 600 0.75rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; border: 1px solid transparent; cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--cream); }
.btn--ghost { border-color: var(--gold-line); color: var(--cream); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--navy { background: var(--navy); color: var(--cream); }
.btn--navy:hover { background: var(--gold); color: var(--ink); }

/* Qualifier text for reported figures */
.qualifier { font-size: 0.75rem; line-height: 1.55; color: var(--stone); }

/* Prototype review bar (hidden with ?clean) */
.review-bar { position: relative; z-index: 300; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: center; justify-content: center; padding: .45rem 1rem; background: var(--gold); color: var(--ink); font: 600 0.6875rem/1.4 var(--sans); letter-spacing: .08em; }
.review-bar a { text-decoration: underline; text-underline-offset: 2px; }
.review-bar a[aria-current="page"] { text-decoration: none; opacity: .55; }
html.clean .review-bar { display: none; }

/* Enquiry form (prototype — not connected) */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .75rem; font-weight: 600; letter-spacing: .06em; }
.field input, .field select, .field textarea { width: 100%; font: 400 1rem/1.5 var(--sans); color: inherit; background: transparent; border: 0; border-bottom: 1px solid currentColor; border-color: var(--gold-line); padding: .55rem 0; border-radius: 0; }
.field textarea { min-height: 7rem; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 1px 0 0 var(--gold); }
.form__note { font-size: .8125rem; color: var(--stone); }
.form__status { font-size: .875rem; color: var(--gold); min-height: 1.4em; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }

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

.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: .5rem; }
.form__actions .form__note { margin: 0; flex: 1 1 14rem; }

/* Concept C: wide vs tall system diagram */
.c-sys--tall { display: none; }
@media (max-width: 640px) { .c-sys--wide { display: none; } .c-sys--tall { display: block; } }
html.is-settling { scroll-behavior: auto !important; }
