/* Diamond Cleaning Training Academy — shared layer (tokens, chrome, infrastructure).
   Language: industrial. Page styles live in their own files (home.css, courses.css, buy.css, pages.css, legal.css). */

:root {
  --paper:   #ebe8e2;   /* concrete */
  --surface: #f6f4f0;
  --surface-2: #dedad2;
  --line:    #c3bdb2;
  --ink:     #17202b;   /* graphite text */
  --muted:   #4d5560;
  --navy:    #0e2a52;   /* brand, from the logo */
  --navy-2:  #163d73;
  --blue:    #1d58b0;   /* diamond blue: links, spec marks */
  --signal:  #b03d0b;   /* signal orange: calls to action only */
  --signal-2:#8f3108;
  --on-dark: #eef1f5;
  --muted-d: #aab6c6;   /* secondary text on navy */
  --ok:      #1f6b3a;
  --err:     #a4221b;

  --f-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-body: 'Barlow', 'Helvetica Neue', sans-serif;
  --f-mono: 'DM Mono', ui-monospace, 'SFMono-Regular', monospace;

  --wrap: 1320px;
  --gut: clamp(16px, 4vw, 56px);
  --r: 0px;             /* industrial: square corners everywhere */
  --shadow: 0 1px 0 var(--line);
  --sc-accent: #0e2a52;
  --sc-icon-stroke: 1.75;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--f-body); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.02; letter-spacing: .005em; margin: 0 0 .4em; text-transform: uppercase; color: var(--ink); }
h1 { font-size: clamp(44px, 7vw, 96px); }
h2 { font-size: clamp(34px, 4.6vw, 62px); }
h3 { font-size: clamp(22px, 2.2vw, 30px); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Technical caption: "SPEC · 04" */
.spec { font: 500 13px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.spec b { color: var(--blue); font-weight: 500; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---- containers, full bleed ---- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.bleed { width: 100vw; margin-left: calc(50% - 50vw); }
.bleed-r { margin-right: calc(50% - 50vw); }
.grid > *, [class*="grid"] > * { min-width: 0; }   /* grid children may shrink: wide tables scroll instead of widening the page */
.sec { padding-block: clamp(64px, 9vw, 128px); }
.sec-tight { padding-block: clamp(40px, 5vw, 72px); }
.dark { background: var(--navy); color: var(--on-dark); }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.dark .spec, .dark .muted { color: var(--muted-d); }
.dark .spec b { color: #8fb4ee; }
.dark a { color: #cfe0fb; }

/* Blueprint marks on the section edge (industrial signature) */
.ticks { position: relative; }
.ticks::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 24px); opacity: .9; }

/* ---- buttons: rectangular, 2px border ---- */
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 2px solid var(--navy);
  background: var(--navy); color: #fff; font: 600 15px/1 var(--f-body); letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-signal { background: var(--signal); border-color: var(--signal); }
.btn-signal:hover { background: var(--signal-2); border-color: var(--signal-2); }
.btn-line { background: transparent; color: var(--navy); }
.btn-line:hover { background: var(--navy); color: #fff; }
.dark .btn-line { color: #fff; border-color: #fff; }
.dark .btn-line:hover { background: #fff; color: var(--navy); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }

/* ---- header ---- */
.head { position: sticky; top: 0; z-index: 50; background: rgba(235, 232, 226, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.head-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); height: 72px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); flex: none; }
.brand img { width: 44px; height: 44px; }
.brand span { display: grid; line-height: 1; }
.brand b { font: 700 25px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }
.brand small { font: 500 11px/1.2 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 10px; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--line); color: var(--ink); }
.nav a[aria-current="page"] { border-color: var(--signal); }
.cart-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--navy); font-weight: 600; border: 2px solid var(--navy); padding: 8px 12px; }
.cart-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.cart-link i { font: 500 13px/1 var(--f-mono); font-style: normal; background: var(--signal); color: #fff; padding: 4px 7px; }
.menu-btn { display: none; min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); background: transparent; font: 600 14px/1 var(--f-body); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
@media (max-width: 1080px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 8px var(--gut) 20px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .cart-link { margin-left: auto; }
}
@media (max-width: 480px) {
  .brand small { display: none; }
  .cart-link span { display: none; }
  .head-in { gap: 12px; }
}

/* ---- footer ---- */
.foot { background: var(--ink); color: #c9d0d9; padding: 72px 0 28px; margin-top: 0; }
.foot a { color: #e7ecf2; text-decoration: none; }
.foot a:hover { text-decoration: underline; color: #fff; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot .spec { color: #9aa6b4; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot .muted { color: #9aa6b4; }
.foot-about p { max-width: 32em; margin-top: 20px; }
.brand-foot { color: #fff; }
.brand-foot small { color: #9aa6b4; }
.pay { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 48px; padding-top: 28px; border-top: 1px solid #2c3847; }
.pay img { height: 26px; width: auto; }
.pay p { margin: 0 0 0 10px; font-size: 14px; color: #9aa6b4; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 28px; font-size: 14px; color: #9aa6b4; }
.foot-base nav { display: flex; gap: 20px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: span 2; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } .foot-about { grid-column: auto; } }

/* ---- forms (shared base; purchase pages add their own layout) ---- */
label { font-weight: 600; font-size: 15px; }
input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #8f8a80; background: #fff; color: var(--ink);
  font: 400 16px/1.4 var(--f-body); border-radius: 0; }
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(29, 88, 176, .25); outline-offset: 0; }
.field-error { color: var(--err); font-size: 14px; font-weight: 600; }
.notice { border-left: 4px solid var(--blue); background: var(--surface); padding: 14px 18px; }
.notice.bad { border-color: var(--err); }
.notice.good { border-color: var(--ok); }

/* ---- photos: duotone by default, colour on hover (industrial) ---- */
.duo { position: relative; overflow: hidden; background: var(--navy); }
.duo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); mix-blend-mode: luminosity; opacity: .92; transition: filter .6s, opacity .6s, mix-blend-mode .6s, transform .8s; }
.duo:hover img, .duo:focus-within img { filter: none; mix-blend-mode: normal; opacity: 1; }

/* ---- motion ---- */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .16s; }
.js .reveal[data-delay="3"] { transition-delay: .24s; }
.js .reveal[data-delay="4"] { transition-delay: .32s; }
/* frame lines "snap shut" from the left when they appear */
.snap { position: relative; }
.snap::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--ink); transform-origin: left; }
.js .snap::after { transform: scaleX(0); }
.js .snap.in::after { animation: snap .9s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes snap { to { transform: scaleX(1); } }
/* sparkle on the diamond mark */
@keyframes glint { 0%, 86%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 92% { opacity: 1; transform: scale(1) rotate(45deg); } }
.glint { animation: glint 6s ease-in-out infinite; transform-origin: center; }

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

@media print {
  .head, .foot, .sc-launch, .sc, .menu-btn { display: none !important; }
  body { background: #fff; }
}
