/* ==========================================================================
   Lanka Thinner Works — shared stylesheet
   Navy palette taken from the company logo, with one warm gold accent,
   colour-coded product stripes and spec blocks set like printed decals.
   ========================================================================== */

:root {
  --paper:      #e9ebf3;   /* pale blue-grey */
  --panel:      #ffffff;
  --navy:       #00007d;   /* sampled straight from the logo */
  --ink:        #101a3d;   /* deep navy, used instead of black */
  --ink-soft:   #59628a;   /* muted blue-grey for secondary text */
  --blue:       #1b4fa0;   /* links and hover states */
  --gold:       #c9a227;   /* the one warm accent, used sparingly */
  --rule:       #c9cee1;

  /* product colour codes — match these to your tin and roll labels */
  --code-thinner:     #c9a227;
  --code-turpentine:  #2a6f97;
  --code-polish:      #8a5a2b;
  --code-retarder:    #3f7d5c;
  --code-tape:        #00007d;

  --wrap: 1120px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Chivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.18rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; max-width: 66ch; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

img, svg { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.lead { font-size: 1.13rem; color: var(--ink-soft); max-width: 58ch; }

/* --- masthead ------------------------------------------------------------ */

.masthead { background: var(--panel); border-bottom: 1px solid var(--rule); }

.masthead-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { width: 36px; height: 36px; flex: none; object-fit: contain; }

.brand-name {
  color: var(--navy);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-letter { display: inline-block; white-space: pre; }

@media (prefers-reduced-motion: no-preference) {
  .brand-letter {
    opacity: 0;
    transform: translateY(-0.2em);
    animation: letter-in .4s cubic-bezier(.2, .7, .3, 1) forwards;
  }
  @keyframes letter-in {
    to { opacity: 1; transform: none; }
  }
}

.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  padding-block: 4px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }

/* a fine bar carrying the five product colour codes, used only here */
.brand-rule {
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--code-thinner)    0 20%,
    var(--code-turpentine) 20% 40%,
    var(--code-polish)     40% 60%,
    var(--code-retarder)   60% 80%,
    var(--code-tape)       80% 100%
  );
}

/* --- sections ------------------------------------------------------------ */

.section { padding-block: 68px; }
.section-tight { padding-block: 48px; }
.section-panel { background: var(--panel); border-block: 1px solid var(--rule); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink h2 { color: #fff; }
.section-ink p { color: #b4bcd8; }
.section-ink a:not(.btn) { color: #e3ba52; }

.section-head { max-width: 62ch; margin-bottom: 34px; }
.section-head p { margin-bottom: 0; color: var(--ink-soft); }

/* --- hero ---------------------------------------------------------------- */

.hero { background: var(--panel); border-bottom: 1px solid var(--rule); }

.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-block: 72px 60px;
}

.hero h1 { max-width: 22ch; }
.hero .lead { margin-bottom: 28px; }

.hero-art { justify-self: end; width: 100%; min-width: 0; }

/* grid and flex children default to min-width:auto, which lets wide content
   (the slider) push a track wider than the screen */
.hero-in > * { min-width: 0; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid var(--rule);
}
.hero-fact {
  flex: 1 1 170px;
  padding: 16px 20px 0 0;
}
.hero-fact b { display: block; font-size: 1.5rem; letter-spacing: -0.02em; }
.hero-fact span { font-size: .88rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: no-preference) {
  .hero-in > * { animation: rise .5s ease-out both; }
  .hero-in > *:nth-child(2) { animation-delay: .12s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}

/* --- buttons ------------------------------------------------------------- */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: #fff;
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #dbb43f; border-color: #dbb43f; color: var(--ink); }

/* --- product decals ------------------------------------------------------ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 22px;
}

.decal {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 2px;
  border-top: 5px solid var(--code, var(--blue));
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
}

.decal h3 { margin-bottom: .25em; }

.decal-use {
  font-size: .9rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.decal p { font-size: .95rem; }

/* spec block — reads like the printed panel on a tin */
.spec {
  margin: 4px 0 0;
  border-top: 1px solid var(--rule);
  font-size: .88rem;
}
.spec div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid #eef0f7;
}
.spec dt { color: var(--ink-soft); }
.spec dd {
  margin: 0;
  font-family: "Chivo Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: .84rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.packs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pack {
  font-size: .78rem;
  font-family: "Chivo Mono", ui-monospace, monospace;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-soft);
}

/* --- plain content cards ------------------------------------------------- */

.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 28px; }
.note h3 { margin-bottom: .35em; }
.note p { font-size: .96rem; color: var(--ink-soft); margin-bottom: 0; }
.note { border-top: 3px solid var(--ink); padding-top: 14px; }

/* --- tables -------------------------------------------------------------- */

.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  background: var(--panel);
}
caption { text-align: left; color: var(--ink-soft); font-size: .88rem; padding-bottom: 10px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule); }
thead th { background: var(--ink); color: #fff; font-weight: 600; border-bottom: none; }
tbody td:not(:first-child) {
  font-family: "Chivo Mono", ui-monospace, monospace;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}

/* --- prose page (about / safety) ----------------------------------------- */

.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: .5em; max-width: 62ch; }

.callout {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 5px solid var(--gold);
  border-radius: 2px;
  padding: 18px 22px;
  margin: 28px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout h3 { font-size: 1.02rem; }

/* --- contact ------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
}

.detail { border-top: 1px solid var(--rule); padding: 14px 0; }
.detail:first-of-type { border-top: 3px solid var(--ink); }
.detail dt { font-size: .84rem; color: var(--ink-soft); margin-bottom: 3px; }
.detail dd { margin: 0; font-size: 1.02rem; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .9rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: .97rem;
  padding: 11px 13px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
}
.field textarea { min-height: 130px; resize: vertical; }

.hidden-field { display: none; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  border-color: var(--ink);
}

/* --- footer -------------------------------------------------------------- */

.footer { background: var(--ink); color: #b4bcd8; font-size: .93rem; }
.footer a { color: #dfe3f2; text-decoration: none; }
.footer a:hover { color: #e3ba52; }
.footer h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; }

.footer-in {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(min(150px, 100%), 1fr));
  gap: 40px;
  padding-block: 52px 40px;
}
.footer-in p { color: #a7afc9; margin-bottom: 0; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }

.footer-base {
  border-top: 1px solid #2b3560;
  padding-block: 18px 24px;
  font-size: .84rem;
  color: #98a1c0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 880px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 34px; padding-block: 48px 44px; }
  .hero-art { order: -1; justify-self: start; width: 210px; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .footer-in { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section { padding-block: 52px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 20px; }
  .masthead-in { padding-block: 12px; }
  .nav { gap: 4px 15px; }
  .nav a { font-size: .9rem; }
  .footer-in { grid-template-columns: 1fr; }
  .section { padding-block: 44px; }
  /* 16px stops iOS zooming the page when a field is tapped */
  .field input, .field select, .field textarea { font-size: 16px; }
}

/* --- hero product slider -------------------------------------------------- */

.slider {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  /* --glow is set from the active slide's colour code by the script */
  box-shadow:
    0 14px 36px -20px rgba(16, 26, 61, .40),
    0 0 30px -6px var(--glow, rgba(16, 26, 61, .12));
  transition: box-shadow .7s ease;
}

.slides { display: flex; transition: transform .55s cubic-bezier(.4,0,.2,1); }

.slide { flex: 0 0 100%; min-width: 0; }

.slide-band { height: 6px; background: var(--code, var(--blue)); }

.slide-body {
  padding: 30px 28px 26px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

/* Photo slot. Uncomment the <img> inside a slide and this shows the picture. */
.slide-media { margin: -30px -28px 22px; }
.slide-media img { display: block; width: 100%; height: 190px; object-fit: cover; }
.slide-media:empty { display: none; }

.slide-kicker {
  font-size: .78rem;
  color: var(--ink-soft);
  letter-spacing: .06em;
  margin: 0 0 10px;
}

.slide-title {
  font-size: clamp(1.6rem, 4vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 8px;
}

.slide-use { font-size: .95rem; color: var(--ink-soft); margin: 0 0 auto; max-width: 34ch; }

.slide .packs { margin-top: 20px; }

.slider-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--rule);
}

.slider-prev, .slider-next {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
}
.slider-prev:hover, .slider-next:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.slider-dots { display: flex; gap: 0; margin-inline: auto 0; }

/* 21px button, 9px visible dot — a finger-sized target without a fat dot */
.slider-dot {
  width: 21px;
  height: 21px;
  padding: 0;
  border: 6px solid transparent;
  border-radius: 50%;
  background: var(--rule);
  background-clip: padding-box;
  cursor: pointer;
}
.slider-dot[aria-current="true"] { background: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .slides { transition: none; }
  .slider { transition: none; }
}

@media (max-width: 880px) {
  .hero-art { width: 100%; order: 0; justify-self: stretch; }
  .slider { max-width: none; }
}

@media (max-width: 560px) {
  .slide-body { padding: 26px 22px 24px; }
  .slide-media { margin: -26px -22px 20px; }
  .slider-prev, .slider-next { width: 42px; height: 42px; }
}

/* --- phone header: brand on one row, nav as a full-width tab bar ---------- */

@media (max-width: 560px) {
  .masthead-in { padding-block: 11px 0; gap: 0; }

  .brand { width: 100%; }
  .brand-name { font-size: 1.16rem; }
  .brand-mark { width: 32px; height: 32px; }

  .nav {
    width: 100%;
    margin-top: 11px;
    padding-top: 2px;
    border-top: 1px solid var(--rule);
    gap: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .nav a {
    font-size: .88rem;
    padding-block: 11px;      /* ~40px tall tap target */
    white-space: nowrap;
  }
}

/* Tables scroll sideways instead of squeezing four columns into 320px */
.table-scroll { -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 480px; }

/* Belt and braces: nothing should ever scroll the page sideways */
html, body { overflow-x: clip; }

@media (max-width: 560px) {
  /* the tall empty gap between the strapline and the pack chips on a phone */
  .slide-body { min-height: 0; }
  .slide-use { margin-bottom: 4px; }
  .slide .packs { margin-top: 16px; }
}

/* --- Dee, the on-site assistant ------------------------------------------ */

.chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 22px 7px 7px;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 26px -10px rgba(16, 26, 61, .55);
}
.chat-launcher:hover { background: var(--navy); }

/* the second tone: a gold disc carrying the icon */
.chat-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--gold);
  border-radius: 50%;
}
.chat-launcher:hover .chat-icon { background: #dbb43f; }
.chat-launcher svg { width: 18px; height: 18px; flex: none; }

.chat-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 61;
  width: 370px;
  max-width: calc(100vw - 32px);
  max-height: min(560px, calc(100vh - 40px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 20px 50px -18px rgba(16, 26, 61, .55);
}
.chat-panel[data-open="true"] { display: flex; }

.chat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 14px 14px 16px;
  background: var(--ink);
  color: #fff;
}
.chat-head img {
  width: 34px;
  height: 34px;
  flex: none;
  padding: 3px;
  background: #fff;          /* the logo is transparent, so it needs a light chip here */
  border-radius: 3px;
}
.chat-who { font-weight: 700; font-size: .98rem; line-height: 1.2; }
.chat-role { font-size: .74rem; color: #a7afc9; }
.chat-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  color: #ccd2e8;
  background: transparent;
  border: 1px solid #333f6b;
  border-radius: 3px;
  cursor: pointer;
}
.chat-close:hover { background: #1e2a56; color: #fff; }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f1f3fa;
}

.chat-msg {
  max-width: 84%;
  padding: 11px 14px;
  font-size: .93rem;
  line-height: 1.5;
  border-radius: 3px;
}
.chat-msg a { color: var(--blue); }
.chat-msg p { margin: 0 0 .55em; max-width: none; }
.chat-msg p:last-child { margin-bottom: 0; }
.chat-msg ul { margin: .2em 0 0; padding-left: 1.1em; }
.chat-msg li { margin-bottom: .25em; }

.chat-bot  { align-self: flex-start; background: var(--panel); border: 1px solid var(--rule); }
.chat-user { align-self: flex-end; background: var(--ink); color: #fff; }
.chat-user a { color: var(--gold); }

.chat-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 16px 4px; background: #f1f3fa; }
.chat-chip {
  font: inherit;
  font-size: .82rem;
  padding: 6px 11px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
.chat-chip:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.chat-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--rule); }
.chat-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.chat-form input:focus-visible { border-color: var(--ink); }
.chat-send {
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  padding: 10px 15px;
  color: var(--ink);
  background: var(--gold);
  border: none;
  border-radius: 3px;
  cursor: pointer;
}
.chat-send:hover { background: #dbb43f; }

@media (max-width: 560px) {
  .chat-launcher { right: 14px; bottom: 14px; padding: 6px 19px 6px 6px; }
  .chat-panel { right: 12px; left: 12px; bottom: 12px; width: auto; max-width: none; max-height: calc(100vh - 90px); }
}

@media (prefers-reduced-motion: no-preference) {
  .chat-panel[data-open="true"] { animation: chat-in .22s ease-out; }
  @keyframes chat-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}
