/* ============================================================
   Anton Tube Well Contractors - stylesheet
   Palette taken from the printed business card: red on dark
   ============================================================ */

:root {
  --red:        #d31f26;
  --red-dark:   #a5161c;
  --red-soft:   #fdeceb;
  --wa:         #25d366;
  --wa-dark:    #1da851;

  --ink:        #16181d;
  --ink-2:      #23262d;
  --grey:       #6b7280;
  --line:       #e4e0dc;
  --paper:      #fbf9f7;
  --white:      #ffffff;

  --font-si: "Noto Sans Sinhala", "Iskoola Pota", sans-serif;
  --font-en: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1140px;
  --r:    14px;
  --r-lg: 20px;
  --shadow:    0 1px 2px rgba(22,24,29,.06), 0 8px 24px rgba(22,24,29,.07);
  --shadow-lg: 0 2px 4px rgba(22,24,29,.08), 0 18px 44px rgba(22,24,29,.14);
}

/* ---------- base ---------- */
*, *::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-family: var(--font-si);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { font-family: var(--font-en); line-height: 1.6; }

img { max-width: 100%; display: block; height: auto; }
svg { display: block; }
a { color: inherit; }

h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 900; letter-spacing: -.01em; }
html[lang="si"] h1, html[lang="si"] h2, html[lang="si"] h3 { line-height: 1.4; letter-spacing: 0; }
p { margin: 0; }

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

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border: 0; border-radius: 999px;
  font: inherit; font-weight: 800;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-red { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(211,31,38,.32); }
.btn-red:hover { background: var(--red-dark); }
.btn-wa  { background: var(--wa);  color: #06301a; box-shadow: 0 6px 18px rgba(37,211,102,.3); }
.btn-wa:hover { background: var(--wa-dark); color: #fff; }

.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-lg { padding: 14px 26px; }
.btn-lg span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; text-align: left; }
.btn-lg small { font-size: .72rem; font-weight: 600; opacity: .85; }
.btn-lg b { font-size: 1.15rem; letter-spacing: .01em; font-family: var(--font-en); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22,24,29,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.09);
  color: #fff;
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 66px; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-inline-end: auto; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border-radius: 10px;
  background: var(--red); color: #fff;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 1rem; font-weight: 800; line-height: 1.3; }
.brand-text small { font-size: .72rem; color: rgba(255,255,255,.6); font-weight: 600; }

.site-nav { display: none; gap: 22px; }
.site-nav a {
  font-size: .92rem; font-weight: 600; text-decoration: none;
  color: rgba(255,255,255,.78); padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #fff; border-bottom-color: var(--red); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch { display: flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.1); }
.lang-switch button {
  padding: 5px 12px; border: 0; border-radius: 999px;
  background: none; color: rgba(255,255,255,.7);
  font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.lang-switch button[lang="si"] { font-family: var(--font-si); }
.lang-switch button[lang="en"] { font-family: var(--font-en); }
.lang-switch button:hover { color: #fff; }
.lang-switch button.is-active { background: #fff; color: var(--ink); }

.header-call { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(211,31,38,.28), transparent 62%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 100% 34px;
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; gap: 34px; padding: 48px 20px 56px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px; margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
  background: rgba(255,255,255,.05);
  font-size: .85rem; font-weight: 700; color: rgba(255,255,255,.85);
}
.eyebrow-badge {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-family: var(--font-en); font-size: .95rem; font-weight: 900;
}

.hero h1 { font-size: clamp(2rem, 7.2vw, 3.5rem); margin-bottom: 18px; }
.hero h1 span { display: block; }
.h1-red { color: #ff4b52; }

.lede { max-width: 46ch; font-size: 1.06rem; color: rgba(255,255,255,.76); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* hero photo - portrait, because the stills come from phone video */
.hero-media { position: relative; display: flex; justify-content: center; }
.hero-photo {
  position: relative; margin: 0; overflow: hidden;
  width: 100%; max-width: 360px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  aspect-ratio: 2 / 3;   /* matches a 1024x1536 generated image exactly */
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 26px 18px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.82));
  font-size: .88rem; font-weight: 700; color: #fff;
}
.hero-photo.is-empty .hero-caption { display: none; }

/* placeholder boxes - visible only while the photo is missing */
[data-placeholder] .placeholder-note { display: none; }
[data-placeholder].is-empty {
  display: grid; place-items: center;
  border: 2px dashed rgba(255,255,255,.22);
  background: rgba(255,255,255,.04);
}
[data-placeholder].is-empty .placeholder-note {
  display: block; padding: 20px; text-align: center;
  font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.5);
}

/* trust strip */
.trust-strip { position: relative; border-top: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.28); }
.trust-inner { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 8px; padding: 18px 20px; text-align: center; }
.trust-item { display: flex; flex-direction: column; gap: 2px; }
.trust-item b { font-size: 1rem; font-weight: 800; color: #fff; }
.trust-item span { font-size: .78rem; color: rgba(255,255,255,.58); line-height: 1.4; }

/* ---------- sections ---------- */
.section { padding: 60px 0; }
.section-dark { background: var(--ink); color: #fff; }
.section-contact { background: var(--white); border-top: 1px solid var(--line); }

.section-head { margin-bottom: 34px; }
.section-head-center { text-align: center; }
.section-head-center .section-sub { margin-inline: auto; }

.kicker {
  margin-bottom: 8px;
  font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--red);
}
.section-dark .kicker { color: #ff5a61; }
.section-head h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
.section-sub { max-width: 52ch; margin-top: 12px; color: var(--grey); }
.section-dark .section-sub { color: rgba(255,255,255,.68); }

/* ---------- service cards ---------- */
.cards { display: grid; gap: 16px; }
.card {
  padding: 26px 24px 28px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(211,31,38,.35); box-shadow: var(--shadow-lg); }
.card-icon {
  display: grid; place-items: center;
  width: 50px; height: 50px; margin-bottom: 16px;
  border-radius: 13px;
  background: var(--red-soft); color: var(--red);
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.1rem; margin-bottom: 9px; }
.card p { color: var(--grey); font-size: .95rem; }

/* ---------- process steps ---------- */
.steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.step {
  position: relative;
  padding: 26px 24px;
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-lg);
  background: rgba(255,255,255,.045);
}
.step-no {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-bottom: 14px;
  border-radius: 50%;
  background: var(--red); color: #fff;
  font-family: var(--font-en); font-size: 1rem; font-weight: 900;
}
.step h3 { font-size: 1.04rem; margin-bottom: 8px; }
.step p { font-size: .93rem; color: rgba(255,255,255,.66); }

/* ---------- gallery (portrait tiles) ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery figure {
  position: relative; margin: 0; overflow: hidden;
  /* the stills run 0.57-0.63 wide/tall; 2:3 crops least and matches the hero */
  aspect-ratio: 2 / 3;
  border-radius: var(--r);
  background: #eceae7;
  box-shadow: var(--shadow);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  font-size: .85rem; font-weight: 700; line-height: 1.35; color: #fff;
}
.gallery figure[data-placeholder].is-empty figcaption { display: none; }
.gallery figure[data-placeholder].is-empty {
  border: 2px dashed var(--line); background: #f3f1ee; box-shadow: none;
}
.gallery figure[data-placeholder].is-empty .placeholder-note {
  font-family: var(--font-en); font-size: .8rem; color: #a8a29b;
}

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 16px; max-width: 760px; margin-inline: auto; }
.contact-card {
  display: block; padding: 26px 24px;
  border: 2px solid var(--line); border-radius: var(--r-lg);
  background: var(--paper);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.contact-card:hover { transform: translateY(-3px); border-color: var(--red); box-shadow: var(--shadow-lg); }
.contact-card-wa:hover { border-color: var(--wa-dark); }
.contact-icon {
  display: grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 14px;
  border-radius: 12px;
  background: var(--red-soft); color: var(--red);
}
.contact-card-wa .contact-icon { background: rgba(37,211,102,.14); color: var(--wa-dark); }
.contact-icon svg { width: 24px; height: 24px; }
.contact-card small { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); }
.contact-card b { display: block; margin: 2px 0 10px; font-family: var(--font-en); font-size: 1.7rem; font-weight: 900; letter-spacing: -.01em; }
.contact-go { font-size: .88rem; font-weight: 700; color: var(--red); }
.contact-card-wa .contact-go { color: var(--wa-dark); }

.service-area {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px;
  max-width: 760px; margin: 30px auto 0;
  padding: 14px 20px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper);
  text-align: center; font-size: .92rem; color: var(--grey);
}
.service-area-icon { display: grid; place-items: center; color: var(--red); }
.service-area-icon svg { width: 19px; height: 19px; }
.service-area em { font-style: normal; font-weight: 800; color: var(--ink); }

/* ---------- footer ---------- */
.site-footer { padding: 34px 0; background: var(--ink); color: rgba(255,255,255,.62); }
.footer-inner { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.footer-brand { font-size: 1rem; font-weight: 800; color: #fff; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; font-size: .88rem; }
.footer-meta a { font-family: var(--font-en); font-weight: 700; color: #fff; text-decoration: none; }
.footer-meta a:hover { color: #ff5a61; }

/* ---------- sticky mobile action bar ---------- */
.action-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(22,24,29,.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.12);
}
.action-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 10px; border-radius: 999px;
  font-size: .98rem; font-weight: 800; text-decoration: none;
}
.action-btn svg { width: 19px; height: 19px; }
.action-call { background: var(--red); color: #fff; }
.action-wa   { background: var(--wa);  color: #06301a; }

body { padding-bottom: 82px; }

/* ============================================================
   Breakpoints
   ============================================================ */
@media (min-width: 560px) {
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-inner { grid-template-columns: repeat(4, 1fr); }
  .trust-item b { font-size: 1.1rem; }
}

@media (min-width: 800px) {
  .site-nav { display: flex; }
  .header-call { display: inline-flex; }
  .action-bar { display: none; }
  body { padding-bottom: 0; }

  .hero-inner { grid-template-columns: 1.2fr .8fr; align-items: center; padding: 76px 20px 84px; gap: 48px; }
  /* portrait tiles get tall fast - keep the gallery from dominating the page */
  .gallery { max-width: 840px; margin-inline: auto; gap: 16px; }
  .section { padding: 84px 0; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .site-header, .action-bar, .hero-media { display: none; }
  body { padding: 0; background: #fff; color: #000; }
  .hero, .section-dark, .site-footer { background: #fff !important; color: #000 !important; }
}
