/* ==========================================================================
   kraflex  |  style.css
   Reset, base typography, links, forms, utilities.
   Load order: variables -> style -> layout -> components -> animation -> responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. MODERN RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;   /* stop iOS inflating text on rotate */
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-3)); /* anchor offset */
  -moz-tab-size: 4;
  tab-size: 4;
  overflow-x: hidden;               /* nothing may ever scroll sideways */
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;               /* belt & braces: no horizontal scroll */
}

/* Media never overflows its container - the #1 cause of mobile side-scroll */
img, picture, video, canvas, svg, iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

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

/* Long words / part numbers won't blow out narrow phone layouts */
p, h1, h2, h3, h4, h5, h6, li, dd, dt, figcaption {
  overflow-wrap: break-word;
}

ul[class], ol[class] { list-style: none; }

table { border-collapse: collapse; width: 100%; }

/* --------------------------------------------------------------------------
   2. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: 0.002em;
  text-wrap: balance;              /* nicer headline wrapping where supported */
  color: inherit;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-family: var(--font-body); font-weight: var(--fw-bold); line-height: var(--lh-snug); }

p { text-wrap: pretty; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 62ch;
}

/* Small uppercase label that sits above a heading */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-2);
}

.eyebrow--rule::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: var(--sp-1);
}

/* Orange word inside a dark headline, as in the hero */
.hl { color: var(--accent); }

/* --------------------------------------------------------------------------
   3. LINKS
   -------------------------------------------------------------------------- */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-soft);
}
a:hover { color: var(--clr-orange-dark); }

/* Inline text links inside prose keep an underline for accessibility */
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* Arrow link used between sections */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-weight: var(--fw-bold);
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  min-height: var(--tap-min);
}
.link-arrow::after {
  content: "\2192";                /* → */
  transition: transform var(--dur-base) var(--ease-out);
}
.link-arrow:hover::after { transform: translateX(5px); }

/* --------------------------------------------------------------------------
   4. FOCUS - visible for keyboard AND TV remote users
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}
/* Never remove focus styling on dark backgrounds */
.on-dark :focus-visible { outline-color: var(--clr-orange-light); }

/* Skip link for screen readers / keyboard */
.skip-link {
  position: absolute;
  left: var(--sp-2);
  top: -100px;
  z-index: var(--z-toast);
  background: var(--accent);
  color: #fff;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-bold);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--sp-2); color: #fff; }

/* --------------------------------------------------------------------------
   5. SELECTION
   -------------------------------------------------------------------------- */
::selection { background: var(--clr-orange); color: #fff; }

/* --------------------------------------------------------------------------
   6. SCROLLBAR (desktop browsers that support it)
   -------------------------------------------------------------------------- */
@supports (scrollbar-color: red blue) {
  html { scrollbar-color: var(--clr-steel-300) transparent; scrollbar-width: thin; }
}

/* --------------------------------------------------------------------------
   7. UTILITIES
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.mx-auto      { margin-inline: auto; }
.measure      { max-width: 62ch; }
.measure-wide { max-width: 78ch; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }

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

.hide { display: none !important; }

/* Cover the whole parent - used to make a whole card clickable.
   Uses ::before so it can be combined with .link-arrow (which uses ::after). */
.stretched-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Decorative diagonal cut inspired by the "X" in the Krishna mark */
.notch-tr {
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}

/* --------------------------------------------------------------------------
   8. CONTENT PROTECTION
   Switched on by js/protect.js, which adds .protect-select to <html>. All the
   switches live at the top of that file - this is only the styling half.

   Note the exemption list: without it the contact form cannot be filled in
   and nobody can copy your own phone number or email, which is the opposite
   of what you want. Add data-selectable to anything else that should stay
   selectable.
   -------------------------------------------------------------------------- */
.protect-select body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;      /* no "save image" panel on iOS long-press */
}

.protect-select input,
.protect-select textarea,
.protect-select select,
.protect-select [contenteditable="true"],
.protect-select [data-selectable],
.protect-select [data-selectable] *,
.protect-select a,
.protect-select a * {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* Pictures cannot be dragged off the page onto the desktop. */
.protect-select img,
img[draggable="false"] {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;             /* the lightbox still needs the click */
}

/* Only applied if blockPrint is turned on in js/protect.js. Off by default,
   because customers do sometimes want to print a specification table. */
.protect-print body { display: none !important; }
.protect-print::after {
  content: "Printing is disabled on this site. Please contact info@kraflex.com <span class="hl">/</span> Krishnaindustries249@gmail.com.";
  display: block;
  padding: 40pt;
  font-family: sans-serif;
  font-size: 12pt;
}

/* --------------------------------------------------------------------------
   9. PRINT
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .to-top,
  .hero__media, .hero__figure, .lightbox { display: none !important; }
  body { color: #000; background: #fff; font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .section { padding: 12pt 0; break-inside: avoid; }
}
