/* =========================================================
   TibebWorks — shared stylesheet
   Edit colours and fonts in the :root block below.
   Every page uses this one file.
   ========================================================= */

:root {
  /* Colours (light mode) — blue theme */
  --bg: #E8F0FC;          /* page background (light blue) */
  --surface: #FFFFFF;     /* cards and panels */
  --band-light: #DCE7FA;  /* slightly deeper blue band behind the Services section */
  --tint: #EEF3FD;        /* light blue fill for highlighted areas */
  --ink: #0B1B36;         /* main text (deep navy) */
  --muted: #4D5C78;       /* secondary text */
  --faint: #8592AB;       /* hints, small labels */
  --line: #DFE6F2;        /* thin dividers (used sparingly) */
  --accent: #2557D6;      /* buttons, links, highlights (royal blue) */
  --accent-strong: #1A44B0; /* accent on hover */
  --accent-soft: #E3EBFD; /* light accent background */
  --accent-ink: #FFFFFF;  /* text on accent */
  --band: #0B1B36;        /* dark contact section background */
  --band-ink: #F2F6FD;    /* text on the dark section */
  --shadow: 0 1px 2px rgba(11,27,54,.05), 0 10px 30px -14px rgba(11,27,54,.16);
  --shadow-lg: 0 2px 4px rgba(11,27,54,.04), 0 28px 60px -24px rgba(23,55,140,.30);

  /* Fonts */
  --sans: 'Geist', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --radius: 16px;
  color-scheme: light;
}

/* Dark mode follows the visitor's device setting */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070E1C;
    --surface: #0F1A2F;
    --band-light: #0B1528;
    --tint: #13213B;
    --ink: #EAF0FA;
    --muted: #A1AEC6;
    --faint: #6E7C97;
    --line: #1C2A45;
    --accent: #6E9BFF;
    --accent-strong: #93B4FF;
    --accent-soft: #16264A;
    --accent-ink: #061026;
    --band: #12224A;
    --band-ink: #EAF0FA;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 28px 60px -24px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; text-wrap: balance; }
p { margin: 0; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

/* Small uppercase label above headings */
.label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 28px; height: 28px; }
.brand span { font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.nav { display: flex; gap: 28px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 12px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn.primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
@media (prefers-reduced-motion: no-preference) { .btn:active { transform: scale(.98); } }

/* ---------- Sections ---------- */
section { padding-block: 96px; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(32px, 4.6vw, 48px); margin-top: 14px; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 18px; }

/* Hero */
.hero { padding-block: 72px 104px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.6vw, 76px); margin: 20px 0 22px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 46ch; margin-bottom: 34px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 6px 14px 6px 12px;
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* Hero visual: a stylised app window built with HTML/CSS */
.mock { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; min-width: 0; }
.mock-bar { display: flex; gap: 6px; padding: 14px 18px; background: var(--tint); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--faint) 45%, transparent); display: block; }
.mock-body { padding: 22px; display: grid; gap: 16px; }
.mock-stat { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mock-stat b { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; }
.mock-stat span { color: var(--muted); font-size: 14px; }
.meter { height: 8px; background: var(--tint); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 64%; background: var(--accent); border-radius: 99px; }
.mock-list { display: grid; gap: 6px; }
.mock-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-size: 14.5px; background: var(--bg); border-radius: 10px; }
.mock-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; margin-left: 0; }
.mock-row .dot.off { background: color-mix(in srgb, var(--faint) 45%, transparent); }
.mock-row span { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: 12.5px; }

/* Services (deeper blue band for rhythm) */
.services { background: var(--band-light); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); margin-bottom: 24px;
}
.card .icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 16px; }

/* Approach */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; }
.principles li { list-style: none; background: var(--surface); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.principles .label {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); margin-bottom: 18px; letter-spacing: 0;
}
.principles h3 { font-size: 21px; margin-bottom: 8px; }
.principles p { color: var(--muted); font-size: 16px; }

/* Contact band */
.contact { padding-block: 0 96px; }
.contact-band {
  background: var(--band); color: var(--band-ink); border-radius: 24px;
  padding: clamp(36px, 6vw, 64px);
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px;
  box-shadow: var(--shadow-lg);
}
.contact-band .label { color: color-mix(in srgb, var(--band-ink) 65%, transparent); }
.contact-band h2 { font-size: clamp(30px, 4.4vw, 46px); margin-top: 14px; max-width: 16ch; }
.contact-band .btn.primary { background: var(--band-ink); color: var(--band); box-shadow: none; }
.contact-band .btn.primary:hover { background: #FFFFFF; color: var(--accent); }
.contact-band .mail { display: block; margin-top: 12px; font-family: var(--mono); font-size: 14px; color: color-mix(in srgb, var(--band-ink) 70%, transparent); }

/* Footer */
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; padding-block: 28px 36px; font-size: 14px; color: var(--faint); }
.site-foot a { color: var(--faint); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }

/* ---------- Family area ---------- */
.family-hero { padding-block: 56px 32px; }
.family-hero h1 { font-size: clamp(38px, 6vw, 56px); margin: 14px 0 12px; }
.family-hero p { color: var(--muted); font-size: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; padding-bottom: 32px; }
.tile {
  display: flex; flex-direction: column; gap: 8px; min-height: 176px;
  background: var(--surface); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
a.tile:hover { box-shadow: var(--shadow-lg); }
@media (prefers-reduced-motion: no-preference) { a.tile:hover { transform: translateY(-2px); } }
.tile h2 { font-size: 22px; }
.tile p { color: var(--muted); font-size: 16px; }
.tile .go { margin-top: auto; font-size: 15px; font-weight: 600; color: var(--accent); }
.tile.soon { background: var(--tint); box-shadow: none; }
.tile.soon h2 { color: var(--muted); }
.tile.soon .go { color: var(--faint); font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 400; }
.note { font-size: 14px; color: var(--muted); padding-block: 20px 48px; }

/* Simple centred page (404) */
.simple { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; padding-block: 64px; }
.simple h1 { font-size: clamp(40px, 6vw, 64px); margin: 14px 0 16px; }
.simple p { color: var(--muted); font-size: 18px; margin-bottom: 28px; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .cards, .principles { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  section { padding-block: 64px; }
  .hero { padding-block: 40px 64px; }
  .contact { padding-block: 0 64px; }
}
