/* Sanin.lk customer pages. Phone first; one bold element (the orange promise strip). */
:root {
  --signal: #F26B21;
  --signal-deep: #C9500F;
  --ink: #1B1F3B;
  --ink-soft: #4A5070;
  --paper: #F3F5F8;
  --panel: #FFFFFF;
  --line: #D6DBE3;
  --done: #1E8E5A;
  --danger: #C2362B;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --text: "Figtree", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.55 var(--text);
}
a { color: var(--ink); }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }

/* Sinhala and Tamil: Noto for their letters (Figtree and Bricolage have none); a little more line height */
html[lang="si"] { --display: "Bricolage Grotesque", "Noto Sans Sinhala", "Iskoola Pota", system-ui, sans-serif; --text: "Figtree", "Noto Sans Sinhala", "Iskoola Pota", system-ui, sans-serif; }
html[lang="ta"] { --display: "Bricolage Grotesque", "Noto Sans Tamil", "Latha", system-ui, sans-serif; --text: "Figtree", "Noto Sans Tamil", "Latha", system-ui, sans-serif; }
html[lang="si"] body, html[lang="ta"] body { line-height: 1.7; }
html[lang="si"] h1, html[lang="ta"] h1, html[lang="si"] h2, html[lang="ta"] h2 { line-height: 1.3; letter-spacing: 0; overflow-wrap: anywhere; }
html[lang="ta"] h1 { font-size: clamp(1.6rem, 6.5vw, 2.6rem); }

/* Language switch: a slim strip above the header */
.lang-bar { background: var(--ink); }
.lang-bar .wrap { display: flex; justify-content: flex-end; gap: 4px; height: 32px; align-items: center; }
.lang-bar a { color: #fff; opacity: 0.75; text-decoration: none; font-size: 0.85rem; padding: 3px 9px; border-radius: 999px; }
.lang-bar a:hover { opacity: 1; }
.lang-bar a[aria-current] { opacity: 1; background: var(--signal); font-weight: 600; }
html:not([lang="si"]) .lang-bar a[lang="si"] { font-family: "Noto Sans Sinhala", "Iskoola Pota", system-ui, sans-serif; }
html:not([lang="ta"]) .lang-bar a[lang="ta"] { font-family: "Noto Sans Tamil", "Latha", system-ui, sans-serif; }

/* Header */
.site-head { background: var(--panel); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 6px; text-decoration: none; font: 800 1.35rem/1 var(--display); letter-spacing: -0.02em; }
.logo svg { width: 22px; height: 22px; }
.logo small { font: 500 0.78rem/1 var(--text); color: var(--ink-soft); letter-spacing: 0; margin-left: 4px; }
.head-call { font-weight: 600; text-decoration: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; }

/* Type */
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.1rem, 7vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 36em; margin: 12px 0 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.875rem; }

/* Home hero: the system tiles are the first action */
.hero { padding: 36px 0 28px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.tile {
  display: flex; flex-direction: column; gap: 10px; min-height: 132px; padding: 16px;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius-lg);
  text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: var(--signal); }
.tile:active { transform: scale(0.98); }
.tile svg { width: 34px; height: 34px; color: var(--signal); }
.tile strong { font: 700 1.15rem/1.15 var(--display); }
.tile span { font-size: 0.85rem; color: var(--ink-soft); }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(3, 1fr); } }

/* The promise strip: the one bold element */
.promise {
  background: var(--signal); color: #fff; padding: 22px 0;
}
.promise p { margin: 0; font: 700 clamp(1.25rem, 4.6vw, 1.75rem)/1.2 var(--display); letter-spacing: -0.01em; }
.promise .clock { font-variant-numeric: tabular-nums; white-space: nowrap; }
.promise small { display: block; margin-top: 6px; font: 500 0.95rem/1.4 var(--text); opacity: 0.92; }

/* Sections */
.section { padding: 40px 0; }
.section + .section { border-top: 1px solid var(--line); }
.rescue { display: grid; gap: 16px; }
@media (min-width: 720px) { .rescue { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.steps li::before {
  content: counter(step); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font: 700 1rem/1 var(--display);
}
.steps strong { display: block; }
.note { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; display: flex; gap: 12px; align-items: center; }
.note svg { width: 40px; height: 40px; flex: none; }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px;
  border: 0; border-radius: 999px; background: var(--signal); color: #fff; font: 700 1.05rem/1 var(--text);
  text-decoration: none; cursor: pointer; transition: background .15s;
}
.btn:hover { background: var(--signal-deep); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn-block { width: 100%; }
.btn-quiet { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.btn-quiet:hover { background: var(--paper); }
.btn-link { background: none; border: 0; color: var(--ink); text-decoration: underline; font: 600 0.95rem var(--text); cursor: pointer; padding: 8px 0; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 160px; }

.page { padding: 28px 0 48px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.panel + .panel { margin-top: 14px; }
.field { display: block; margin-top: 18px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { display: block; font-weight: 400; font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }
input[type=text], input[type=tel], input[type=email], textarea {
  width: 100%; font: 400 1rem/1.4 var(--text); color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
}
input:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(242,107,33,.25); }
textarea { min-height: 96px; resize: vertical; }
.code-input { font: 700 1.8rem/1 var(--display) !important; letter-spacing: 0.4em; text-align: center; }
.error { color: var(--danger); font-size: 0.9rem; margin-top: 6px; }
.form-error { background: #FDECEA; color: var(--danger); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 14px; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice label { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 12px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; font-weight: 600; cursor: pointer;
}
.choice span svg { width: 22px; height: 22px; color: var(--signal); flex: none; }
.choice input:checked + span { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); background: #FFF5EF; }
.choice input:focus-visible + span { outline: 3px solid var(--signal); outline-offset: 2px; }

.toggle { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-weight: 600; cursor: pointer; }
.toggle input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--signal); flex: none; }
details.more { margin-top: 18px; }
details.more summary { cursor: pointer; font-weight: 600; }

.stepper { display: flex; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.stepper li { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.stepper li.on { background: var(--signal); }

.device { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius-sm); background: var(--paper); margin-top: 12px; }
.device svg { width: 32px; height: 32px; color: var(--signal); flex: none; }
.ok { color: var(--done); font-weight: 700; }

/* Tracking */
.status-big { font: 800 clamp(1.7rem, 6vw, 2.4rem)/1.1 var(--display); letter-spacing: -0.02em; margin-top: 6px; }
.progress { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 0; }
.progress li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; min-height: 40px; position: relative; color: var(--ink-soft); }
.progress li::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: #fff; margin: 4px 0 0 6px; z-index: 1;
}
.progress li::after { content: ""; position: absolute; left: 12px; top: 20px; bottom: -2px; width: 2px; background: var(--line); }
.progress li:last-child::after { display: none; }
.progress li.done { color: var(--ink); }
.progress li.done::before { background: var(--done); border-color: var(--done); }
.progress li.done::after { background: var(--done); }
.progress li.now { color: var(--ink); font-weight: 700; }
.progress li.now::before { background: var(--signal); border-color: var(--signal); box-shadow: 0 0 0 4px rgba(242,107,33,.2); }
.progress time { display: block; font-size: 0.82rem; font-weight: 400; color: var(--ink-soft); }

.quote-lines { width: 100%; border-collapse: collapse; margin-top: 10px; }
.quote-lines td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.quote-lines td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.quote-total td { font: 700 1.15rem var(--display); border-bottom: 0; padding-top: 12px; }

.stars { display: flex; gap: 6px; margin-top: 10px; }
.stars button { width: 48px; height: 48px; border: 1.5px solid var(--line); border-radius: 50%; background: #fff; font-size: 1.4rem; cursor: pointer; color: var(--line); }
.stars button.on { color: var(--signal); border-color: var(--signal); }

.app-invite { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 20px; margin-top: 14px; }
.app-invite h3 { color: #fff; }
.app-invite p { margin: 6px 0 0; opacity: .85; }

.loading { padding: 48px 0; text-align: center; color: var(--ink-soft); }
[hidden] { display: none !important; }

.site-foot { padding: 28px 0 40px; color: var(--ink-soft); font-size: 0.9rem; border-top: 1px solid var(--line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-foot a { color: var(--ink-soft); }

/* The technician on the job (tracking page) */
.tech { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tech img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper); }
