/* ============================================================
   DUCKIT MOTORSPORT — foundation
   Palette derived from the mark: monochrome white on carbon.
   One hot accent (torch orange) = glowing manifold / brake disc.
   Geometry derived from the mark: nested diffuser-fin chevrons,
   expressed site-wide as a single repeated cut angle.
   ============================================================ */

:root {
  /* --- surface ladder: carbon, cool-shifted --- */
  --ink:        #0A0A0B;
  --ink-2:      #101012;
  --ink-3:      #17171A;
  --ink-4:      #202025;
  --paper:      #F2F2EF;   /* off-white, faintly warm — light sections */
  --paper-2:    #E4E4DF;

  /* --- type --- */
  --white:      #FFFFFF;
  --mute:       #8A8A93;   /* 5.78:1 on --ink   ✓AA */
  --mute-dim:   #7C7C85;   /* 4.79:1 on --ink, 4.60:1 on --ink-2  ✓AA at 12px */
  --on-paper:   #131315;
  --on-paper-mute: #55555C; /* 6.9:1 on --paper ✓AA */

  /* --- accent: torch. 5.89:1 on --ink, safe for text --- */
  --torch:      #FF4A1C;
  --torch-hot:  #FF6A3D;
  --torch-dim:  rgba(255, 74, 28, 0.14);

  /* --- burnt-titanium heat wash. DECORATIVE ONLY, never behind text --- */
  --ti: linear-gradient(100deg, #2B7FFF 0%, #7A4BE0 38%, #FF4A1C 68%, #FFB020 100%);

  /* --- lines --- */
  --line:        rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.22);
  --line-paper:  rgba(19, 19, 21, 0.14);

  /* --- type families --- */
  --display: 'Saira', 'Helvetica Neue', Arial, sans-serif; /* sporty technical grotesque */
  --body:    'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; /* part codes, specs */

  /* --- fluid type scale (dialled down one notch from the first cut) --- */
  --t-hero:  clamp(2.4rem, 1.55rem + 4.1vw, 5.25rem);
  --t-xl:    clamp(1.65rem, 1.2rem + 2.3vw, 3rem);
  --t-lg:    clamp(1.35rem, 1.08rem + 1.3vw, 2rem);
  --t-md:    clamp(1.1rem, 0.99rem + 0.55vw, 1.4rem);
  --t-body:  clamp(0.975rem, 0.94rem + 0.18vw, 1.0625rem);
  --t-sm:    0.875rem;
  --t-xs:    0.75rem;

  /* --- rhythm --- */
  --gap:      20px;
  --pad-x:    clamp(20px, 5vw, 72px);
  --sec-y:    clamp(72px, 9vw, 148px);
  /* content column. One knob — .wrap, the header and the home hero all use it */
  --maxw:     1440px;
  --header-h: 76px;
  /* Inner-page banner height. Only the home hero fills the screen; every other
     page opens on a band and gets its content into view straight away. */
  --band-h:   clamp(280px, 40svh, 440px);

  /* --- signature cut angle (diffuser fin) --- */
  --cut:      22px;
  --skew:     -7deg;

  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:  cubic-bezier(0.65, 0, 0.35, 1);
}

@media (max-width: 767px) {
  :root { --header-h: 62px; --cut: 14px; }
}

/* ============================================================ reset */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* anchor targets clear the sticky header */
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* belt-and-braces; layouts must not need it */
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* ============================================================ a11y */

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

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--torch);
  color: var(--ink);
  font-weight: 700;
  transition: top 0.18s var(--ease);
}
.skip:focus { top: 12px; }

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

/* ============================================================ layout */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* full-bleed blocks keep edge contact but still pad their contents */
.bleed { width: 100%; padding-inline: var(--pad-x); }

.section { padding-block: var(--sec-y); }

/* ============================================================ shared type atoms */

/* small letterspaced label — used as the one recurring "tag" voice */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--torch);
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: var(--torch);
  flex: none;
}
.eyebrow--paper { color: var(--on-paper); }
.eyebrow--paper::before { background: var(--torch); }

.lede {
  color: var(--mute);
  font-size: var(--t-md);
  line-height: 1.5;
  max-width: 46ch;
}

.spec {
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  color: var(--mute);
}

/* small local-area line (SEO long-tail: surrounding towns / Klang Valley) */
.local-note { margin-top: 14px; max-width: 62ch; color: var(--mute); font-size: var(--t-sm); line-height: 1.6; }

/* ============================================================ buttons */

.btn {
  --btn-bg: var(--torch);
  /* near-black on torch = 5.89:1 (white would be 3.36:1, below AA),
     and black-on-orange is the truer motorsport signage pairing anyway */
  --btn-fg: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 26px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* the signature cut — bottom-left fin notch */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { --btn-bg: var(--torch-hot); transform: translateY(-2px); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn--ghost:hover { --btn-bg: rgba(255,255,255,0.07); --btn-fg: var(--white); }

.btn--paper { --btn-bg: var(--on-paper); --btn-fg: var(--paper); }
.btn--paper:hover { --btn-bg: var(--torch); --btn-fg: var(--ink); }

/* ============================================================ motion */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].in { opacity: 1; transform: none; }

/* no-JS / no-IntersectionObserver fallback: always visible */
.no-js [data-reveal] { opacity: 1; transform: none; }

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

/* ============================================================ touch
   Phones only. The desktop layout puts a lot of weight on small inline links
   and 9–10px mono micro-labels; both fail on a thumb and on a 390px screen,
   so raise the floor rather than restyling each component. */
@media (max-width: 767px) {
  /* every inline text link that is a row of its own gets a 44px touch box */
  .caps__all, .sig__go, .dprod__all, .socs__go,
  .ftr__mail, .ftr__person, .ftr__link,
  .khero__mail, .khero__wa, .loc__mail, .loc__map, .loc__p,
  .crumbs__i a, .sidx__n {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  /* footer link columns: space the rows so neighbouring targets don't collide */
  .ftr__li { padding: 0; }
  .ftr__li a, .faq__note a, .ftr__base a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* micro-label floor — 9px mono is unreadable at arm's length */
  .drawer__no, .tw__n, .tw__s, .cat__lab, .cat__rail-h,
  .sidx__no, .spec, .ftr__person span {
    font-size: 0.6875rem;
  }
  .tw__l { font-size: 0.8125rem; }
}
