/* Ridgekey Cyber — site styles */
:root {
  --ink: #0b1118;
  --ink-2: #121b26;
  --ink-3: #1b2734;
  --paper: #ffffff;
  --mist: #f3f5f7;
  --line: #e1e6eb;
  --text: #1c2630;
  --muted: #5a6875;
  --muted-dark: #9fb0bf;
  --accent: #0e7c8c;
  --accent-bright: #5cc8d6;
  --radius: 10px;
  --wrap: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--paper); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }

.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: .9rem; }

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 650; padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid var(--accent); cursor: pointer; font: inherit; font-weight: 650; transition: background .2s, color .2s, transform .2s; }
.btn:hover { background: #0a6573; border-color: #0a6573; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-small { padding: .5rem 1.1rem; font-size: .92rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.brand img { width: 120px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 600; font-size: .96rem; }
.site-nav a:not(.btn):hover { color: var(--accent); }
.site-nav .btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 24px; height: 2px; background: var(--ink); position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; } .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.25rem; display: none; }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 1rem; text-align: center; }
}

/* Hero */
.hero { position: relative; overflow: hidden; color: #fff; background:
  radial-gradient(1200px 500px at 80% -10%, rgba(92,200,214,.22), transparent 60%),
  linear-gradient(180deg, #0b1118 0%, #111c28 100%);
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(8rem, 16vw, 12rem); }
.hero-inner { position: relative; z-index: 1; max-width: 860px; margin-left: max(1.25rem, calc((100% - var(--wrap)) / 2)); }
.hero .eyebrow { color: var(--accent-bright); }
.hero .lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: #c9d6e1; max-width: 640px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(120px, 22vw, 300px); }
.ridge-back { fill: #1b2a39; }
.ridge-front { fill: var(--ink-3); }

/* Strip */
.strip { background: var(--ink-3); color: #fff; padding: 0 0 2.5rem; }
.strip-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: 2rem; }
.strip strong { display: block; color: var(--accent-bright); font-size: 1.05rem; margin-bottom: .2rem; }
.strip span { color: var(--muted-dark); font-size: .95rem; }
@media (max-width: 720px) { .strip-inner { grid-template-columns: 1fr; } }

/* Sections */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head p:last-child { color: var(--muted); font-size: 1.08rem; }
.section-dark { background: var(--ink); color: #e8eef3; }
.section-dark .eyebrow { color: var(--accent-bright); }
.section-dark .section-head p:last-child { color: var(--muted-dark); }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.service { background: #fff; padding: 2rem 2rem 1.6rem; position: relative; transition: background .2s; }
.service:hover { background: var(--mist); }
.service .num { display: block; font-weight: 800; font-size: .85rem; color: var(--accent); letter-spacing: .1em; margin-bottom: .6rem; }
.service p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } .service { padding: 1.6rem 1.4rem; } }

/* Case studies */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.case { background: var(--ink-2); border: 1px solid rgba(255,255,255,.07); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, border-color .25s; }
.case:hover { transform: translateY(-4px); border-color: rgba(92,200,214,.4); }
.case picture { aspect-ratio: 4 / 3; overflow: hidden; }
.case img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); transition: transform .5s; }
.case:hover img { transform: scale(1.04); }
.case-body { padding: 1.5rem 1.5rem 1.7rem; }
.case .tag { display: inline-block; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--accent-bright); margin-bottom: .6rem; }
.case h3 { color: #fff; }
.case-body p:last-child { color: var(--muted-dark); font-size: .96rem; margin: 0; }
@media (max-width: 1000px) { .cases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cases { grid-template-columns: 1fr; } }

/* Approach */
.approach { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 1rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3rem 1fr; gap: .2rem 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); grid-row: span 2; font-weight: 800; color: var(--accent); font-size: 1.1rem; }
.steps strong { font-size: 1.1rem; }
.steps span { color: var(--muted); }
@media (max-width: 820px) { .approach { grid-template-columns: 1fr; gap: 1rem; } }

/* Contact */
.section-contact { background: var(--mist); }
.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3.5rem; align-items: start; }
.contact-intro > p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; flex-direction: column; }
.contact-list .label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.contact-list a { font-size: 1.25rem; font-weight: 650; color: var(--ink); text-decoration: none; }
.contact-list a:hover { color: var(--accent); }

.contact-form { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; box-shadow: 0 20px 50px -30px rgba(11,17,24,.35); }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 650; font-size: .92rem; }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea { font: inherit; padding: .75rem .9rem; border: 1px solid #cbd3db; border-radius: 8px; background: #fff; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,124,140,.18); }
.field.invalid input, .field.invalid textarea { border-color: #c0392b; }
.field .err { color: #c0392b; font-size: .85rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacy-note { color: var(--muted); font-size: .88rem; margin: 0; }
.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: #1e7e4a; }
.form-status.fail { color: #c0392b; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; gap: 2rem; } }
@media (max-width: 560px) { .contact-form { grid-template-columns: 1fr; padding: 1.4rem; } }

/* Footer */
.site-footer { background: var(--ink); color: var(--muted-dark); padding: 3rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-inner img { width: 110px; opacity: .9; }
.footer-inner nav { display: flex; gap: 1.6rem; }
.footer-inner a { color: #d5dee6; text-decoration: none; font-size: .95rem; }
.footer-inner a:hover { color: var(--accent-bright); }
.copy { margin: 0; font-size: .88rem; }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-content: center; text-align: center; padding: 4rem 1.25rem; }
.notfound p { color: var(--muted); }

/* ---- Service links on homepage cards ---- */
.service h3 a { color: inherit; text-decoration: none; }
.service h3 a:hover { color: var(--accent); }
.service .more, .service-link .more { display: inline-block; margin-top: .9rem; font-weight: 650; font-size: .92rem; color: var(--accent); text-decoration: none; }
.service-link { display: block; color: inherit; text-decoration: none; }
.service-link .h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 .5em; color: var(--text); }
.service-link:hover .more { text-decoration: underline; }

/* ---- Inner page hero & breadcrumbs ---- */
.page-hero { background: linear-gradient(180deg, #0b1118 0%, #111c28 100%); color: #fff; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); max-width: 860px; }
.page-hero .eyebrow { color: var(--accent-bright); }
.page-hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #c9d6e1; max-width: 760px; margin-bottom: 1.8rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 2rem; font-size: .88rem; color: var(--muted-dark); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .6; }
.crumbs a { color: #d5dee6; text-decoration: none; }
.crumbs a:hover { color: var(--accent-bright); }

/* ---- Service page layout ---- */
.svc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 4rem; align-items: start; }
.svc-main h2 { font-size: 1.6rem; margin-top: 2.6rem; }
.svc-main h2:first-child { margin-top: 0; }
.svc-main > p { color: var(--muted); font-size: 1.05rem; max-width: 70ch; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 2rem; font-size: 1.05rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--accent); -webkit-mask: none; }
.ticks li::after { content: ""; position: absolute; left: .38rem; top: .55em; width: .3rem; height: .55rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.svc-aside { position: sticky; top: 100px; background: var(--mist); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.svc-aside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.svc-aside a { display: block; padding: .45rem 0; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); font-size: .95rem; }
.svc-aside li:last-child a { border-bottom: 0; }
.svc-aside a:hover { color: var(--accent); }
.mini-cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.mini-case { display: block; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.mini-case:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -20px rgba(11,17,24,.5); }
.mini-case picture { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.mini-case img { width: 100%; height: 100%; object-fit: cover; }
.mini-case .tag { display: block; padding: 1rem 1.1rem 0; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.mini-case strong { display: block; padding: .3rem 1.1rem 1.1rem; }
@media (max-width: 900px) { .svc-layout { grid-template-columns: 1fr; gap: 2.5rem; } .svc-aside { position: static; } }
@media (max-width: 560px) { .mini-cases { grid-template-columns: 1fr; } }

/* ---- CTA band ---- */
.cta-band { background: var(--mist); padding: 3.5rem 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-inner h2 { margin-bottom: .3rem; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta-inner p { color: var(--muted); margin: 0; }

/* ---- Footer (multi-column) ---- */
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.6fr .8fr; gap: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand img { width: 110px; margin-bottom: 1rem; }
.footer-brand p { font-size: .92rem; max-width: 32ch; margin: 0; }
.footer-head { text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; font-weight: 700; color: var(--accent-bright); margin: 0 0 .8rem; }
.svc-aside .footer-head { color: var(--accent); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-cols { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
.footer-links a { color: #d5dee6; text-decoration: none; font-size: .93rem; }
.footer-links a:hover { color: var(--accent-bright); }
.footer-base { padding-top: 1.5rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Services dropdown ---- */
.nav-item { position: relative; }
.nav-drop { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; font-size: .96rem; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.nav-drop::after { content: ""; width: .45rem; height: .45rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.nav-drop[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.nav-drop:hover { color: var(--accent); }
.sub-menu { list-style: none; margin: 0; display: none; }
.site-nav .sub-menu a { display: block; color: var(--text); text-decoration: none; font-weight: 500; font-size: .94rem; }
.site-nav .sub-menu a:hover { color: var(--accent); }
.nav-drop[aria-expanded="true"] + .sub-menu { display: block; }
@media (min-width: 821px) {
  .sub-menu { position: absolute; top: calc(100% + 22px); left: -1.2rem; min-width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 50px -24px rgba(11,17,24,.35); padding: .5rem; z-index: 60; }
  .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; }
  .site-nav .sub-menu a { padding: .55rem .8rem; border-radius: 6px; }
  .site-nav .sub-menu a:hover { background: var(--mist); }
  .sub-menu li:first-child { border-bottom: 1px solid var(--line); margin-bottom: .3rem; padding-bottom: .3rem; }
}
@media (min-width: 821px) and (hover: hover) {
  .has-sub:hover .sub-menu { display: block; }
}
@media (max-width: 820px) {
  .nav-drop { width: 100%; justify-content: space-between; padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav-drop::after { margin-right: .4rem; }
  .sub-menu { padding: .3rem 0 .6rem 1rem; border-bottom: 1px solid var(--line); }
  .site-nav .sub-menu a { padding: .5rem 0; border-bottom: 0; }
}

/* Footer contact links */
.footer-brand p + p { margin-top: .9rem; line-height: 1.7; }
.footer-brand a { color: #d5dee6; text-decoration: none; }
.footer-brand a:hover { color: var(--accent-bright); }
