/* בז פתרונות גובה — site styles.
   Single source of design tokens: the :root block below. Rules for changing anything here
   live in AGENTS.md (read it before editing). Every page must fit one desktop screen
   (1280×720 and up); phones may scroll. */

/* ---------- Fonts (self-hosted, SIL OFL — see assets/fonts/LICENSE.txt) ---------- */
@font-face { font-family: "Heebo"; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/heebo-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/heebo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Karantina"; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/karantina-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Karantina"; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/karantina-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  /* colour — sampled from the logo */
  --purple-900: #1c0d29;   /* deepest: text on gold */
  --purple-800: #2b1540;   /* brand purple: headings, tiles, primary buttons */
  --purple-700: #3c2158;   /* hover */
  --purple-200: #d9cfe4;   /* text on purple (secondary) */
  --purple-100: #ece7f2;   /* tint: hover backgrounds */
  --gold: #d4a017;         /* accent: rope, CTAs on purple. Never text on light bg (contrast) */
  --gold-text: #8a6508;    /* gold that passes AA on --paper, for small text */
  --paper: #f5f4f8;        /* page background */
  --card: #ffffff;
  --ink: #1f1729;          /* body text */
  --muted: #5a5266;        /* secondary text, AA on paper */
  --line: #dcd7e3;
  --wa: #0e7a3f;           /* WhatsApp action, darkened so white text passes AA at any size */
  --error: #b42318;

  /* type */
  --font-display: "Karantina", "Heebo", system-ui, sans-serif;
  --font-body: "Heebo", system-ui, sans-serif;

  /* shape */
  --radius-sm: 6px;
  --radius: 16px;
  --header-h: 76px;
  --wrap: 1200px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  color: var(--ink); background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: -9999px; top: 8px; z-index: 100; background: var(--card); padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 700; }
.skip:focus { inset-inline-start: 16px; }
:focus-visible { outline: 3px solid var(--purple-700); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent;
  font: 700 17px/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-gold { background: var(--gold); color: var(--purple-900); }
.btn-gold:hover { background: #e3b22e; }
.btn-purple { background: var(--purple-800); color: #fff; }
.btn-purple:hover { background: var(--purple-700); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #0b6634; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 19px; }
.btn-block { width: 100%; }

/* ---------- Header: thin info strip + main bar ---------- */
.topstrip { background: var(--purple-900); color: var(--purple-200); font-size: 14px; }
.topstrip-inner { display: flex; align-items: center; gap: 24px; min-height: 36px; }
.topstrip-links { display: flex; gap: 18px; }
.topstrip a { color: #fff; text-decoration: none; font-weight: 600; }
.topstrip a:hover, .topstrip a[aria-current="page"] { color: var(--gold); }
.topstrip-hours { margin-inline-start: auto; }
.topstrip-phone { display: inline-flex; align-items: center; gap: 6px; }
.topstrip-phone svg { width: 15px; height: 15px; color: var(--gold); }
.topstrip :focus-visible { outline-color: var(--gold); }

.site-header { height: var(--header-h); background: #fff; border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 50; }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { height: 54px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font: 700 36px/0.85 var(--font-display); color: var(--purple-800); }
.brand-text span { font: 700 21px/1 var(--font-display); color: var(--gold-text); }
.nav { display: flex; align-items: stretch; height: 100%; margin-inline-start: auto; }
.nav a { display: flex; align-items: center; padding: 0 14px; font-weight: 700; font-size: 16.5px; text-decoration: none; color: var(--purple-800); white-space: nowrap; }
.nav a:hover { background: var(--purple-100); }
.nav a[aria-current="page"] { box-shadow: inset 0 -4px 0 var(--purple-800); }
.nav-extra { display: none; }
.header-call { flex: none; }
.burger { display: none; margin-inline-start: auto; width: 48px; height: 48px; border: 0; background: none; cursor: pointer; padding: 12px; }
.burger span { display: block; height: 2px; background: var(--purple-800); margin: 5px 0; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Page frame ---------- */
main { flex: 1; display: flex; }
main > .wrap { display: flex; flex-direction: column; justify-content: center; padding-block: 36px; }
.page-title { font: 700 clamp(54px, 6vw, 80px)/0.92 var(--font-display); color: var(--purple-800); }
.page-lead { color: var(--muted); font-size: 18px; max-width: 58ch; margin-top: 12px; }

/* ---------- Home: headline row + photo tiles ---------- */
.home-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 18px; }
.home-title { font: 700 clamp(48px, 5.2vw, 72px)/0.95 var(--font-display); color: var(--purple-800); }
.home-lead { font-size: 18px; color: var(--muted); margin-top: 8px; max-width: 56ch; }
.home-ctas { display: flex; gap: 10px; flex: none; }

/* Photo tiles (PSK pattern): photo, dark scrim, white title, a plain button. Lead tile spans the row.
   Photos are set per service below as .tile-<slug> so the CSP never needs inline styles. */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  min-height: clamp(150px, 23svh, 250px); padding: 20px; border-radius: var(--radius-sm); overflow: hidden;
  color: #fff; text-decoration: none; isolation: isolate;
  background: var(--purple-800) center / cover no-repeat;
}
.tile::before { /* scrim keeps white text AA over any photo */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(28,13,41,.92) 0%, rgba(28,13,41,.55) 55%, rgba(28,13,41,.15) 100%);
}
.tile-wide { grid-column: 1 / -1; min-height: clamp(130px, 25svh, 270px); padding: 24px 28px; background-position: center 10%; }
.tile-wide::before { background: linear-gradient(to left, rgba(28,13,41,.95) 0%, rgba(28,13,41,.8) 32%, rgba(28,13,41,.1) 70%); }
[dir="ltr"] .tile-wide::before { transform: scaleX(-1); }
.tile-title { font: 700 34px/1 var(--font-display); }
.tile-wide .tile-title { font-size: 48px; }
.tile-line { font-size: 15px; color: #eee7f4; }
.tile-btn {
  align-self: flex-start; margin-top: 10px; padding: 8px 18px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.7); font-weight: 700; font-size: 15px;
  transition: background-color .15s, color .15s;
}
.tile:hover .tile-btn, .tile:focus-visible .tile-btn { background: var(--gold); border-color: var(--gold); color: var(--purple-900); }
.tile:focus-visible { outline-color: var(--gold); outline-offset: 3px; }
/* photos: Timor's own jobs, one per service (assets/photos/tile-<slug>.webp) */
.tile-sealing { background-image: url("/assets/photos/tile-sealing.webp"); }
.tile-rope-access { background-image: url("/assets/photos/tile-rope-access.webp"); }
.tile-birds { background-image: url("/assets/photos/tile-birds.webp"); }
.tile-windows { background-image: url("/assets/photos/tile-windows.webp"); }
.tile-more { background-image: url("/assets/photos/tile-more.webp"); }

/* ---------- Service page ---------- */
.svc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.svc-sub { font: 700 30px/1 var(--font-display); color: var(--purple-800); margin-top: 22px; }
.svc-list { margin-top: 8px; border-top: 1px solid var(--line); }
.svc-list-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.svc-list li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.svc-list li::before { content: ""; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); flex: none; position: relative; top: -2px; }
.svc-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.svc-photo { margin: 0; border-radius: var(--radius-sm); overflow: hidden; height: min(62svh, 560px); background: var(--purple-800); }
.svc-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about-text p { color: var(--muted); margin-top: 14px; max-width: 52ch; }
.about-sub { font: 700 30px/1 var(--font-display); color: var(--purple-800); margin-top: 24px; }
.values { display: grid; gap: 10px; margin-top: 12px; }
.values li { display: flex; gap: 12px; align-items: baseline; font-weight: 600; }
.values li::before { content: ""; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); flex: none; position: relative; top: -2px; }
.steps-title { font: 700 38px/1 var(--font-display); color: var(--purple-800); margin-bottom: 12px; }
/* a real sequence, so numbers are information here — strung on the rope */
.steps { counter-reset: step; position: relative; padding-inline-start: 64px; }
.steps::before { content: ""; position: absolute; inset-inline-start: 25px; top: 8px; bottom: 8px; width: 3px; background: var(--gold); border-radius: 2px; }
.step { position: relative; padding: 12px 0 14px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; inset-inline-start: -64px; top: 10px; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: var(--purple-800); color: var(--gold);
  font: 700 32px/1 var(--font-display); border: 3px solid var(--paper);
}
.step h3 { font-size: 18px; }
.step p { color: var(--muted); font-size: 16px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact-actions { display: grid; gap: 12px; margin-top: 26px; max-width: 420px; }
.contact-facts { margin-top: 24px; display: grid; gap: 12px; }
.contact-facts li { display: grid; }
.contact-facts small { color: var(--muted); font-size: 14px; }
.contact-facts strong { font-size: 17px; }
.form { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form h2 { grid-column: 1 / -1; font: 700 38px/1 var(--font-display); color: var(--purple-800); }
.field { display: grid; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 15px; }
.field .req { color: var(--error); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper);
  border: 1.5px solid #b9b1c4; border-radius: var(--radius-sm); padding: 11px 14px; min-height: 48px;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--purple-100); border-color: var(--purple-700); background: #fff; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.form-error { color: var(--error); font-size: 15px; font-weight: 600; }
.form-error:empty { display: none; }
.form-note { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; }
.form-note a { color: var(--purple-800); font-weight: 600; }

/* ---------- Legal pages (the one place long reading is allowed to scroll) ---------- */
.legal { max-width: 72ch; padding-block: 40px 56px; }
.legal h1 { font: 700 clamp(48px, 5vw, 68px)/0.95 var(--font-display); color: var(--purple-800); }
.legal .updated { color: var(--muted); font-size: 15px; margin-top: 8px; }
.legal h2 { font-size: 21px; color: var(--purple-800); margin-top: 30px; }
.legal p, .legal li { margin-top: 10px; }
.legal ul { list-style: disc; padding-inline-start: 22px; }
.legal a { color: var(--purple-800); font-weight: 600; }
.legal .todo { background: #fff3c4; padding: 0 4px; border-radius: 4px; }

/* ---------- 404 ---------- */
.notfound { display: grid; gap: 18px; justify-items: center; text-align: center; }
.notfound img { width: 220px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 52px; flex-wrap: wrap; padding-block: 8px; }
.footer-links { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; font-weight: 600; color: var(--purple-800); }
.footer-links a:hover { text-decoration: underline; }

.actionbar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .header-call { display: none; }
  .about, .contact, .svc { gap: 40px; }
  .nav a { padding: 0 10px; font-size: 15.5px; }
}
@media (max-height: 800px) and (min-width: 901px) {
  /* short laptop screens (1366×768): tighten so pages still fit */
  main > .wrap { padding-block: 22px; }
  .steps .step { padding: 8px 0 10px; }
  .form { padding: 20px; gap: 10px 14px; }
}
@media (max-height: 680px) and (min-width: 901px) {
  /* 1366×768 laptop with browser chrome ≈ 640px of page */
  :root { --header-h: 64px; }
  .brand img { height: 46px; }
  main > .wrap { padding-block: 14px; }
  .page-title { font-size: clamp(48px, 5vw, 64px); }
  .home-head { margin-bottom: 12px; }
  .tile { padding: 16px; }
  .tile-wide .tile-title { font-size: 42px; }
  .svc-sub { margin-top: 14px; }
  .svc-list li { padding: 6px 0; }
  .svc-ctas { margin-top: 14px; }
  .contact-actions, .contact-facts { margin-top: 12px; gap: 6px; }
  .form { padding: 14px 20px; gap: 6px 14px; }
  .form h2 { font-size: 32px; }
  .field textarea { min-height: 52px; }
  .footer-inner { min-height: 44px; padding-block: 4px; }
}
@media (max-width: 1180px) {
  .topstrip-hours { display: none; }
}
@media (max-width: 1060px) {
  :root { --header-h: 68px; }
  .burger { display: block; }
  .header-call { margin-inline-start: auto; }
  .burger { margin-inline-start: 0; }
  .nav {
    display: none; position: absolute; inset-inline: 0; top: var(--header-h); height: auto;
    flex-direction: column; padding: 8px 16px 16px; background: #fff;
    border-bottom: 3px solid var(--gold); box-shadow: 0 16px 24px -16px rgba(28,13,41,.25);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; font-size: 18px; border-radius: var(--radius-sm); }
  .nav a[aria-current="page"] { box-shadow: inset -4px 0 0 var(--gold); }
  .nav-extra { display: contents; }
  .nav-extra a { color: var(--muted); font-weight: 600; }
}
@media (max-width: 900px) {
  body { padding-bottom: 76px; }
  .brand img { height: 46px; }
  .topstrip, .header-call { display: none; }
  .burger { margin-inline-start: auto; }
  main > .wrap { justify-content: flex-start; padding-block: 28px 32px; }
  .about, .contact, .svc { grid-template-columns: 1fr; }
  .home-ctas, .contact-actions, .svc-ctas { display: none; } /* the action bar carries them */
  .home-head { display: block; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile:last-child { grid-column: 1 / -1; }
  .tile { min-height: 150px; padding: 14px; }
  .tile-title { font-size: 28px; }
  .svc-photo { height: 240px; order: -1; }
  .svc-list-2 { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; padding: 20px; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; }
  .actionbar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line);
  }
  .actionbar .btn { width: 100%; padding: 0 12px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .tile-line { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media print { .site-header, .site-footer, .actionbar { display: none; } }
