/* Master Way Ltd — single stylesheet. Mobile-first. */
:root {
  --navy: #0B1F3A;
  --navy-2: #13325C;
  --teal: #0FB5AE;          /* accent: use on navy or as fill, not for text on light bg */
  --teal-text: #0A6F6A;     /* AA-compliant teal for text/links on light backgrounds */
  --bg: #F7F9FC;
  --white: #FFFFFF;
  --text: #475569;          /* slate body text */
  --heading: #0B1F3A;
  --line: #DDE3EC;
  --error: #B42318;
  --success: #067647;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(11,31,58,.06), 0 4px 16px rgba(11,31,58,.08);
  --max: 1200px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--text); background: var(--bg); }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { color: var(--heading); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--teal-text); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--white { background: var(--white); }
.section--navy { background: var(--navy); color: #CBD5E1; }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section__intro { max-width: 720px; margin-bottom: 40px; }
.eyebrow { display: inline-block; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-text); margin-bottom: .5rem; }
.section--navy .eyebrow, .hero .eyebrow { color: var(--teal); }
.lead { font-size: 1.1875rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; color: var(--white); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 12px 22px; border-radius: var(--radius); border: 2px solid transparent; font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn--accent { background: var(--teal); color: var(--navy); }
.btn--accent:hover { background: #12CFC7; color: var(--navy); }
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-2); color: var(--white); }
.btn--ghost { border-color: currentColor; color: var(--white); background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: .9375rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 800; letter-spacing: .08em; font-size: 1.125rem; }
.logo--light { color: var(--white); }
.logo__mark { width: 40px; height: 40px; flex: none; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--navy); cursor: pointer; }
.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 12px 20px 20px; }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0 0 12px; padding: 0; }
.site-nav li a { display: block; padding: 12px 4px; color: var(--navy); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.site-nav a[aria-current="page"] { color: var(--teal-text); box-shadow: inset 3px 0 0 var(--teal); padding-left: 12px; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex !important; position: static; align-items: center; gap: 24px; padding: 0; border: 0; box-shadow: none; background: none; }
  .site-nav ul { display: flex; gap: 4px; margin: 0; }
  .site-nav li a { border: 0; padding: 10px 12px; border-radius: var(--radius); }
  .site-nav li a:hover { background: var(--bg); }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--teal); padding-left: 12px; border-radius: var(--radius) var(--radius) 0 0; }
}

/* Hero */
.hero { position: relative; color: #CBD5E1; background: url("../img/pattern.svg") right center / 640px auto no-repeat, linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); padding: 72px 0 80px; overflow: hidden; }
.hero h1 { color: var(--white); max-width: 20ch; }
.hero p.lead { color: #E2E8F0; max-width: 60ch; margin-bottom: 28px; }
.hero--sm { padding: 56px 0; }
.hero--sm h1 { max-width: none; }

.trust { background: var(--white); border-bottom: 1px solid var(--line); }
.trust ul { list-style: none; margin: 0; padding: 16px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; font-weight: 600; color: var(--navy); font-size: .9375rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { color: var(--teal-text); flex: none; }

/* Grids & cards */
.grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.card h3 { margin-top: 12px; }
.card p:last-child { margin-bottom: 0; }
.card--link { display: flex; flex-direction: column; text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s; }
.card--link:hover { transform: translateY(-2px); color: var(--text); box-shadow: 0 8px 28px rgba(11,31,58,.14); }
.card--link .more { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--teal-text); }
.icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: var(--radius); background: rgba(15,181,174,.12); color: var(--teal-text); }
.icon svg { width: 26px; height: 26px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-top: 56px; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: var(--navy); font-weight: 800; display: grid; place-items: center; }
.section--navy .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); box-shadow: none; color: #CBD5E1; }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 7px; border-left: 3px solid var(--teal-text); border-bottom: 3px solid var(--teal-text); transform: rotate(-45deg); }

.cta-band { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #E2E8F0; border-radius: var(--radius); padding: 40px 28px; display: grid; gap: 24px; }
.cta-band h2 { color: var(--white); }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 48px; } }
.cta-band a:not(.btn) { color: var(--white); }
.contact-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-lines li { display: flex; gap: 10px; align-items: center; }
.contact-lines svg { color: var(--teal); flex: none; }

/* Services page */
.service { display: grid; gap: 24px; padding: 40px 0; border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; }
@media (min-width: 900px) { .service { grid-template-columns: 1fr 1fr; gap: 48px; } }
.service h2 { font-size: clamp(1.4rem, 2.6vw, 1.875rem); margin-top: 12px; }

/* About */
.person { display: grid; gap: 24px; align-items: start; }
@media (min-width: 768px) { .person { grid-template-columns: 140px 1fr; } }
.avatar { width: 120px; height: 120px; border-radius: 50%; background: var(--navy); color: var(--teal); display: grid; place-items: center; font-size: 2.5rem; font-weight: 800; letter-spacing: .04em; }

/* FAQ */
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 18px 20px; font-weight: 700; color: var(--navy); list-style-position: outside; }
.faq details > div { padding: 0 20px 18px; }

/* Forms */
.contact-layout { display: grid; gap: 32px; }
@media (min-width: 1024px) { .contact-layout { grid-template-columns: 1.5fr 1fr; } }
.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field .req { color: var(--error); }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--navy); background: var(--white); border: 1px solid #94A3B8; border-radius: var(--radius); padding: 12px 14px; min-height: 48px; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--teal); outline-offset: 0; border-color: var(--navy); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__error { color: var(--error); font-size: .9375rem; margin-top: 6px; }
.field__error:empty { display: none; }
.field--check { display: flex; gap: 12px; align-items: flex-start; }
.field--check input { width: 22px; height: 22px; min-height: 0; margin-top: 3px; flex: none; accent-color: var(--navy); }
.field--check label { font-weight: 400; color: var(--text); margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: var(--radius); padding: 16px 18px; font-weight: 600; }
.notice--success { background: #ECFDF3; color: var(--success); border: 1px solid #ABEFC6; }
.notice--error { background: #FEF3F2; color: var(--error); border: 1px solid #FECDCA; }
.notice[hidden] { display: none; }
.target-notice { display: none; }
.target-notice:target { display: block; margin-bottom: 20px; }
.small { font-size: .9375rem; }

/* Legal */
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; padding-top: .4em; border-top: 1px solid var(--line); }
.prose h2:first-child { border-top: 0; margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 32px; }
.toc a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); text-decoration: none; font-weight: 600; }
dl.facts { display: grid; grid-template-columns: 1fr; gap: 4px 24px; margin: 0 0 1em; }
dl.facts dt { font-weight: 700; color: var(--navy); }
dl.facts dd { margin: 0 0 10px; }
@media (min-width: 640px) { dl.facts { grid-template-columns: 220px 1fr; } dl.facts dd { margin: 0; } }

/* Footer */
.site-footer { background: var(--navy); color: #CBD5E1; padding: 56px 0 24px; font-size: .9375rem; }
.site-footer a { color: #E2E8F0; }
.site-footer a:hover { color: var(--teal); }
.footer__grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer__tag { margin-top: 12px; max-width: 36ch; }
.footer__h { color: var(--white); font-size: 1rem; margin-bottom: 12px; }
.footer__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer__legal { border-top: 1px solid rgba(255,255,255,.14); margin-top: 40px; padding-top: 20px; font-size: .875rem; color: #B6C2D3; }

.error-page { text-align: center; padding: 96px 0; }
.error-page .btn-row { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print { .site-header, .site-footer .footer__grid, .nav-toggle { display: none; } }
h2.h3 { font-size: 1.2rem; margin-top: 12px; }
