/* =============================================================
   Smart Connect — Design system (senior refinement)
   -------------------------------------------------------------
   Single accent: teal #00BFD4. No secondary/orange accent.
   Clean neutral base, hairline borders, soft layered shadows.
   Rebrand from the token block below.
   ============================================================= */

:root {
  --brand:      0 191 212;   /* #00BFD4 teal — the ONLY accent   */
  --brand-600:  4 168 189;   /* hover                            */
  --brand-700:  7 122 138;   /* deep teal (accent text)          */
  --brand-50:  236 253 255;  /* light wash                       */
  --ink:        20 23 26;    /* #14171A deep — dark surfaces      */
  --ink-800:    30 34 39;    /* #1E2227 headings / body text      */
  --muted:      92 105 120;  /* #5C6978 secondary text            */
  --line:      233 237 240;  /* #E9EDF0 hairline border           */
  --surface:   247 250 251;  /* #F7FAFB soft section background    */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: rgb(var(--ink-800));
  background: #fff;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-wrap: pretty; /* avoid a single orphan word on the last line, site-wide */
}
h1, h2, h3, h4 { font-family: 'Sora', 'Inter', sans-serif; letter-spacing: -0.025em; color: rgb(var(--ink-800)); text-wrap: balance; /* balance heading lines so no word wraps alone */ }
img, svg { max-width: 100%; }
::selection { background: rgb(var(--brand) / .20); }
section[id] { scroll-margin-top: 5.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: .9rem; line-height: 1;
  padding: .8rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .95rem 1.7rem; font-size: .98rem; }
.btn-primary { background: linear-gradient(135deg, rgb(var(--brand)) 0%, rgb(var(--brand-700)) 100%); color: #fff; box-shadow: 0 10px 26px -12px rgb(var(--brand) / .7); }
.btn-primary:hover { background: linear-gradient(135deg, rgb(var(--brand-600)) 0%, rgb(var(--brand-700)) 100%); color: #fff; transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgb(var(--brand) / .8); }
.btn-ghost { background: #fff; color: rgb(var(--ink-800)); border-color: rgb(var(--line)); }
.btn-ghost:hover { border-color: rgb(var(--ink-800) / .35); transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgb(16 24 40 / .35); }
.btn-ghost-light { background: rgb(255 255 255 / .08); color: #fff; border-color: rgb(255 255 255 / .28); }
.btn-ghost-light:hover { background: #fff; color: rgb(var(--ink-800)); border-color: #fff; }

/* ---------- Eyebrow (editorial, teal) ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgb(var(--brand-700)); }
.eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: rgb(var(--brand)); }
.eyebrow--bare::before { display: none; }
.section-dark .eyebrow { color: #6fdcec; }
.section-dark .eyebrow::before { background: #6fdcec; }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); color: rgb(var(--muted)); font-size: .74rem; font-weight: 600; }
.chip-flag { display: inline-flex; align-items: center; justify-content: center; width: 2.9rem; height: 2.9rem; border-radius: .85rem; background: #fff; border: 1px solid rgb(var(--line)); font-size: 1.35rem; flex: none; }

/* ---------- Icons ---------- */
.icon-chip { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: .9rem; background: rgb(var(--brand-50)); color: rgb(var(--brand-700)); flex: none; }
.icon-chip svg { width: 1.5rem; height: 1.5rem; }
.icon-chip-sm { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: .7rem; background: rgb(var(--brand-50)); color: rgb(var(--brand-700)); flex: none; }
.icon-chip-sm svg { width: 1.25rem; height: 1.25rem; }
/* Hero floating value-prop bubbles */
.hero-bubble { position: absolute; z-index: 3; display: flex; align-items: center; gap: .8rem; width: 14.75rem; padding: .9rem 1.05rem; border-radius: 1.15rem; background: rgb(255 255 255 / .95); backdrop-filter: blur(8px); border: 1px solid rgb(255 255 255 / .8); box-shadow: 0 16px 38px -10px rgb(16 24 40 / .38), 0 3px 8px rgb(16 24 40 / .08); }
.hero-bubble .b-lead { font-size: .8rem; font-weight: 600; color: rgb(var(--muted)); line-height: 1.15; }
.hero-bubble .b-main { font-size: 1.12rem; font-weight: 800; color: rgb(var(--ink-800)); line-height: 1.15; letter-spacing: -0.015em; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .5rem; color: rgb(var(--muted)); font-size: .94rem; }
.check-list li svg { width: 1.1rem; height: 1.1rem; color: rgb(var(--brand)); flex: none; margin-top: .18rem; }

/* ---------- Cards ---------- */
.card { position: relative; background: #fff; border: 1px solid rgb(var(--line)); border-radius: 1.5rem; padding: 1.75rem; transition: transform .26s ease, box-shadow .26s ease, border-color .26s ease; }
.card-hover:hover { transform: translateY(-6px); box-shadow: 0 1px 2px rgb(16 24 40 / .04), 0 30px 60px -32px rgb(16 24 40 / .3); border-color: rgb(var(--brand) / .35); }

/* ---------- Decorative (teal only) ---------- */
.text-gradient { background: linear-gradient(100deg, rgb(var(--brand)) 0%, rgb(var(--brand-700)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grid-bg {
  background-image: linear-gradient(rgb(var(--ink-800) / .045) 1px, transparent 1px), linear-gradient(90deg, rgb(var(--ink-800) / .045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000, transparent 76%);
  mask-image: radial-gradient(circle at 50% 0%, #000, transparent 76%);
}
.glass { background: rgb(255 255 255 / .82); backdrop-filter: blur(16px); border: 1px solid rgb(255 255 255 / .7); box-shadow: 0 24px 60px -26px rgb(16 24 40 / .4); }
.glass-dark { background: rgb(255 255 255 / .045); backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / .1); }

/* ---------- Dark sections + footer ---------- */
.section-dark { background: rgb(var(--ink)); color: rgb(160 174 188 / 1); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.teal-glow { position: relative; }
.teal-glow::after { content: ""; position: absolute; z-index: 0; pointer-events: none; width: 36rem; height: 36rem; right: -9rem; top: -12rem; border-radius: 999px; background: radial-gradient(circle, rgb(var(--brand) / .18), transparent 62%); }

/* Footer bottom bar — copyright left; legal links aligned under the "Get started" column (same track template as the footer grid above) */
.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
@media (min-width: 768px) {
  .footer-bottom { display: grid; grid-template-columns: 1.6fr 1fr 1fr; column-gap: 2.5rem; align-items: center; }
  .footer-bottom > p { margin: 0; }
  .footer-legal { grid-column: 3; }
}
.footer-legal a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease; }
.site-header.scrolled { background: rgb(255 255 255 / .82); backdrop-filter: saturate(180%) blur(12px); box-shadow: 0 1px 0 rgb(16 24 40 / .05), 0 12px 34px -22px rgb(16 24 40 / .3); }
.nav-link { font-size: .9rem; font-weight: 500; color: rgb(var(--muted)); text-decoration: none; transition: color .15s ease; }
.nav-link:hover { color: rgb(var(--ink-800)); }
.section-dark .nav-link { color: #9fb0bf; }
.section-dark .nav-link:hover { color: #fff; }

/* ---------- Forms ---------- */
.label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .4rem; color: rgb(var(--ink-800)); }
.req { color: rgb(var(--brand-700)); }
.input { width: 100%; padding: .72rem .9rem; font: inherit; color: rgb(var(--ink-800)); background: #fff; border: 1px solid rgb(var(--line)); border-radius: .8rem; transition: border-color .15s ease, box-shadow .15s ease; }
.input::placeholder { color: #9aa4b2; }
.input:focus { outline: none; border-color: rgb(var(--brand)); box-shadow: 0 0 0 3px rgb(var(--brand) / .16); }
.input.input-invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgb(239 68 68 / .16); }
.input.input-invalid:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgb(239 68 68 / .22); }
input[type="checkbox"].input-invalid { outline: 2px solid #ef4444; outline-offset: 2px; }
textarea.input { min-height: 120px; resize: vertical; }
.form-note { margin-top: .9rem; padding: .7rem .9rem; background: rgb(var(--brand-50)); border: 1px solid rgb(var(--brand) / .45); border-radius: .8rem; font-size: .88rem; color: rgb(var(--brand-700)); }
.form-note-success { background: rgb(var(--brand-50)); border-color: rgb(var(--brand) / .45); color: rgb(var(--brand-700)); }
.form-note-error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* ---------- Application modal ---------- */
dialog#apply-dialog { width: min(640px, 94vw); border: 0; padding: 0; border-radius: 0.75rem; box-shadow: 0 50px 100px -30px rgb(0 0 0 / .55); overflow: hidden; color: rgb(var(--ink-800)); }
dialog#apply-dialog::backdrop { background: rgb(16 18 20 / .58); backdrop-filter: blur(3px); }
dialog#apply-dialog[open] { animation: dlg-in .28s cubic-bezier(.2,.7,.2,1) both; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.dialog-accent { height: 5px; background: rgb(var(--brand)); }
.dialog-body { padding: 1.6rem 1.7rem 1.8rem; max-height: 82vh; overflow: auto; }
.dialog-close { width: 2.2rem; height: 2.2rem; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: rgb(var(--surface)); color: rgb(var(--muted)); font-size: 1.4rem; line-height: 1; cursor: pointer; transition: background-color .15s ease; }
.dialog-close:hover { background: rgb(var(--line)); }

/* ---------- Open-position accordions ---------- */
.job-toggle { background: none; cursor: pointer; }
.chevron { transition: transform .3s ease; color: rgb(var(--muted)); }
.job-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); color: rgb(var(--brand-700)); }
.job-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s ease; }
.job-panel.open { grid-template-rows: 1fr; }
.job-panel-inner { overflow: hidden; }

/* ---------- Career ladder (ascending, text-first) ---------- */
.ladder { display: grid; gap: 1.5rem; }
.rung {
  position: relative; background: #fff;
  border: 1px solid rgb(var(--line));
  border-radius: 1.1rem; padding: 1.4rem 1.4rem 1.5rem;
  box-shadow: 0 14px 34px -18px rgb(16 24 40 / .3);
  transition: transform .25s ease, box-shadow .25s ease;
}
.ladder .rung:hover { transform: translateY(-4px); box-shadow: 0 24px 46px -22px rgb(16 24 40 / .38); }
.rung-top { display: flex; align-items: center; justify-content: space-between; }
.rung-badge { display: inline-flex; align-items: baseline; gap: .4rem; font-family: 'Sora','Inter',sans-serif; font-weight: 800; font-size: 1.9rem; letter-spacing: -0.02em; color: rgb(var(--brand-700)); }
.rung-badge b { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.rung-arrow { width: 1.2rem; height: 1.2rem; color: rgb(var(--brand)); opacity: .85; flex: none; }
.rung-title { font-family: 'Sora','Inter',sans-serif; font-size: 1.35rem; font-weight: 800; color: rgb(var(--ink-800)); letter-spacing: -0.02em; margin: 1rem 0 .45rem; }
.rung-desc { font-size: .92rem; line-height: 1.55; color: rgb(var(--muted)); }
@media (min-width: 768px) {
  .ladder { grid-template-columns: repeat(4, 1fr); align-items: start; }
  .rung:nth-child(1) { margin-top: 7.5rem; }
  .rung:nth-child(2) { margin-top: 5rem; }
  .rung:nth-child(3) { margin-top: 2.5rem; }
  .rung:nth-child(4) { margin-top: 0; }
}

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; } .reveal.d2 { transition-delay: .14s; } .reveal.d3 { transition-delay: .21s; } .reveal.d4 { transition-delay: .28s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.float { animation: floaty 7s ease-in-out infinite; }
.float-delay { animation-delay: -3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float { animation: none; }
  dialog#apply-dialog[open] { animation: none; }
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid rgb(var(--brand)); outline-offset: 2px; border-radius: 6px;
}

/* ---------- Mobile hero: match Figma (centered copy, stacked CTAs, value-props as cards under the image) ---------- */
@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { text-align: center; }
  .hero-copy .max-w-xl { margin-left: auto; margin-right: auto; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-bubble { position: static; width: 100%; inset: auto !important; margin-top: .85rem; }
  .hero-bubble:first-of-type { margin-top: 1.25rem; }
}

/* ---------- Mobile Malta: text on white, full-quality photo below (natural aspect, never stretched) ---------- */
.malta-photo { display: none; }
@media (max-width: 1023px) {
  .malta-banner { background-image: none !important; min-height: 0 !important; }
  .malta-copy { padding-top: 40px !important; padding-bottom: 24px !important; }
  .malta-photo { display: block; width: 100%; height: auto; }
}

/* ---------- Mobile stats: breathing room between stacked figures ---------- */
@media (max-width: 767px) {
  .stats-list { row-gap: 2rem; }
}
