/* Pesto Labs — production stylesheet
   Colour tokens, base type, component states, responsive rules.
   Per-element layout lives inline in index.html (approved build). */

:root {
  --bg: #0B1B2B;
  --bg-blur: rgba(11, 27, 43, 0.94);
  --surface: #132B41;
  --surface-2: #0F2437;
  --surface-3: #102436;
  --surface-sel: #183553;
  --panel: #14304A;
  --text: #EAF3F9;
  --text-strong: #F2F7FA;
  --muted: #A9BCCB;
  --dim: #8AA3B6;
  --line: #24455F;
  --line-2: #2A4A67;
  --line-3: #2E5070;
  --ring: #3A5D7A;
  --line-warm: #5A3020;
  --accent: #FF6B3D;
  --accent-soft: #FF8A5C;
  --accent2: #6FC3E8;
  --sel: #6FC3E8;
  --error: #FF8A6E;
  --on-accent: #08131F;
  --invert-bg: #FFFFFF;
  --invert-fg: #08131F;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; }

html, body, p, h1, h2, h3, h4, h5, h6, a, li, span, div,
header, footer, nav, section, main, button, input, select, textarea, label {
  font-family: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

p { font-weight: 400; margin-block: 0; }

a { color: var(--accent2); text-decoration: none; }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

.page {
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* ---------- Buttons ---------- */

.btn-accent2:hover { background: var(--accent) !important; color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-soft) !important; color: var(--on-accent); }
.btn-ghost:hover { border-color: var(--text) !important; color: var(--text); }
.btn-ghost-strong:hover { border-color: var(--text-strong) !important; color: var(--text-strong); }
.btn-invert:hover { background: var(--invert-bg) !important; color: var(--invert-fg) !important; }
.modal-close:hover { border-color: var(--text) !important; color: var(--text); }

/* ---------- Service cards ---------- */

.service-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  box-shadow: none;
  border-radius: 14px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  box-sizing: border-box;
  justify-content: space-between;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.service-card.is-selected {
  background: var(--surface-sel);
  border-color: var(--sel);
  box-shadow: 0 0 0 1px var(--sel);
}

/* "Selected" indicator — independent of the "Recommended" badge */
.service-card .pip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sel);
  visibility: hidden;
}

.service-card.is-selected .pip { visibility: visible; }

/* ---------- Contact modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 10, 16, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal[hidden] { display: none; }

.modal-panel {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

.field-label .optional {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.field-input {
  font-size: 15.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 13px 14px;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
}

.field-input:focus { border-color: var(--accent2); outline: none; }

select.field-input { appearance: none; }
textarea.field-input { resize: vertical; line-height: 1.5; }

.field-error { font-size: 13.5px; color: var(--error); }
.field-error[hidden] { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  section, header > div { padding-left: 22px !important; padding-right: 22px !important; }
  [data-m="s3"] { grid-template-columns: 1fr !important; gap: 22px !important; }
  [data-m="s4"] { grid-template-columns: 1fr 1fr !important; }
  [data-m="span"] { grid-column: 1 / -1 !important; }
  h1 { font-size: 42px !important; }
  h2 { font-size: 30px !important; }
  [data-m="cta"] { padding: 40px 26px !important; }
}

@media (max-width: 700px) {
  [data-m="s2"] { grid-template-columns: 1fr !important; gap: 28px !important; }
  [data-m="s4"] { grid-template-columns: 1fr !important; }
  [data-m="portrait"] { width: 100% !important; height: 320px !important; }
  h1 { font-size: 34px !important; letter-spacing: -0.035em !important; }
  h2 { font-size: 26px !important; }
  section { padding-top: 56px !important; padding-bottom: 40px !important; }
  #top { padding-top: 56px !important; }
  [data-m="s3"] > div, [data-m="s2"] > div { max-width: 100% !important; }
  .modal-panel { padding: 26px 20px !important; }
}

@media (max-width: 640px) {
  header > div { flex-wrap: nowrap !important; }
  header nav a[href="#services"], header nav a[href="#how"], header nav a[href="#about"] { display: none !important; }
  header nav a[href="#contact"] { padding: 9px 15px !important; font-size: 14px !important; }
  header a[href="#top"] svg { width: 28px; height: 28px; }
  header a[href="#top"] .wordmark { font-size: 18px !important; }
  header a[href="#top"] .descriptor { font-size: 8.5px !important; letter-spacing: 0.18em !important; }
}
