/* Ideal Tech: shared styles. Mobile-first, no external dependencies. */
:root {
  --navy: #0f1e3d;
  --navy-2: #172b55;
  --blue: #2563eb;
  --teal: #14b8a6;
  --ink: #1f2937;
  --muted: #5b6577;
  --bg: #ffffff;
  --soft: #f4f7fb;
  --line: #e3e8f0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 30, 61, .08);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section.soft { background: var(--soft); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 10px;
}
.lead { font-size: 1.1rem; color: var(--muted); }

.skip-link {
  position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff;
  padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 10px;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1d4fd0; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header and navigation */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 1.2rem; }
.brand svg { width: 36px; height: 36px; }
.brand span b { color: var(--blue); }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2px; background: var(--navy); position: relative; transition: .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.nav-menu {
  display: none; position: absolute; top: 68px; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  list-style: none; margin: 0; padding: 8px 20px 20px;
}
.nav-menu.open { display: block; }
.nav-menu a {
  display: block; padding: 14px 4px; text-decoration: none; color: var(--ink);
  font-weight: 600; border-bottom: 1px solid var(--line);
}
.nav-menu a[aria-current="page"] { color: var(--blue); }
.nav-menu .btn { display: flex; margin-top: 14px; width: 100%; border-bottom: 0; color: #fff; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex !important; position: static; align-items: center; gap: 28px;
    padding: 0; border: 0; box-shadow: none; background: transparent;
  }
  .nav-menu a { border: 0; padding: 6px 0; }
  .nav-menu .btn { display: inline-flex; margin: 0; width: auto; padding: 0 18px; min-height: 42px; }
}

/* Hero */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(20,184,166,.35), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; padding: 72px 0 80px;
}
.hero h1 { color: #fff; max-width: 760px; }
.hero .lead { color: #cdd6e6; max-width: 620px; }
.hero .btn-row { margin-top: 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 32px; padding: 0; list-style: none; color: #cdd6e6; font-size: .95rem; }
.hero-points li::before { content: "✓"; color: var(--teal); font-weight: 800; margin-right: 8px; }
.page-hero { padding: 56px 0 60px; }

/* Grids and cards */
.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 959px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); height: 100%;
}
.card p { color: var(--muted); margin: 0; }
.card ul { color: var(--muted); padding-left: 18px; margin: 10px 0 0; }
.card li { margin: 4px 0; }
.icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: #e8f0ff; color: var(--blue); margin-bottom: 16px;
}
.icon svg { width: 24px; height: 24px; }

.size-card { text-align: left; border-top: 4px solid var(--teal); }
.size-card .tag { font-size: .8rem; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .08em; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 20px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { position: relative; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 14px;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; }

/* Case study feature */
.feature {
  display: grid; gap: 28px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow);
}
@media (min-width: 900px) { .feature { grid-template-columns: 1.1fr 1fr; padding: 40px; } }
.feature-visual {
  border-radius: 16px; min-height: 220px; display: grid; place-items: center; text-align: center;
  background: linear-gradient(135deg, #1f6b3a, #b22234 55%, #e0a526); color: #fff; padding: 28px;
}
.feature-visual strong { display: block; font-size: 1.3rem; }
.feature-visual em { opacity: .9; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: #e7f8f5; color: #0f766e; margin-bottom: 12px; }
.checks { list-style: none; padding: 0; margin: 16px 0 24px; }
.checks li { padding-left: 28px; position: relative; margin: 8px 0; color: var(--muted); }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--blue), #1e40af); color: #fff; border-radius: 20px; padding: 40px 28px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe6ff; max-width: 560px; margin: 0 auto 22px; }
.cta-band .btn-primary { background: #fff; color: var(--blue); }

/* Forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--ink);
  border: 1px solid #cbd3df; border-radius: 10px; background: #fff;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(37,99,235,.25); border-color: var(--blue); }
.form-note { font-size: .88rem; color: var(--muted); }
.form-status { display: none; padding: 14px 16px; border-radius: 10px; background: #e7f8f5; color: #0f766e; font-weight: 600; }
.form-status.show { display: block; }
.form-status.error { background: #fdecec; color: #a12a2a; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-footer { background: var(--navy); color: #b9c3d6; padding: 48px 0 28px; margin-top: 64px; }
.site-footer a { color: #e5ebf5; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 8px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 18px; font-size: .88rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ===== Redesign additions: photos, motion, richer layout ===== */

/* Hero with photo */
.hero { position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto -120px -160px auto; width: 420px; height: 420px;
  border-radius: 50%; background: radial-gradient(circle, rgba(37,99,235,.35), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; gap: 40px; align-items: center; position: relative; z-index: 1; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; } }
.hero-media { position: relative; }
.hero-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px;
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.hero-badge {
  position: absolute; left: -10px; bottom: -18px; background: #fff; color: var(--navy);
  border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .95rem;
}
.hero-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 6px rgba(20,184,166,.18); }
@media (max-width: 959px) { .hero-badge { left: 12px; } }
.accent { background: linear-gradient(90deg, #5eead4, #93c5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Page hero with background photo */
.page-hero.has-photo { background-size: cover; background-position: center; }
.page-hero.has-photo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(15,30,61,.95) 30%, rgba(23,43,85,.75));
}
.page-hero .container { position: relative; z-index: 1; }

/* Split section: text beside a photo */
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } .split.reverse .split-media { order: 2; } }
.split-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); }

/* Photo service rows (services page) */
.service-row { display: grid; gap: 24px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); }
.service-row:last-child { border-bottom: 0; }
@media (min-width: 900px) {
  .service-row { grid-template-columns: 1fr 1fr; gap: 56px; padding: 44px 0; }
  .service-row:nth-child(even) .service-media { order: 2; }
}
.service-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); }
.service-row ul { color: var(--muted); padding-left: 18px; }

/* Card motion */
.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(15,30,61,.12); border-color: #cfd9ea; }
.card:hover .icon { background: var(--blue); color: #fff; }
.icon { transition: background .2s, color .2s; }

/* Photo card */
.photo-card { padding: 0; overflow: hidden; }
.photo-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.photo-card .body { padding: 22px 24px 26px; }

/* Trust strip */
.trust { display: grid; gap: 14px; margin-top: 36px; }
@media (min-width: 640px) { .trust { grid-template-columns: repeat(3, 1fr); } }
.trust div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 16px 18px; color: #dbe4f3; font-size: .95rem; }
.trust strong { display: block; color: #fff; font-size: 1.05rem; margin-bottom: 2px; }

/* Scroll reveal: only hides content when JS has loaded, so nothing is lost without JS */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* Tablet tuning */
@media (min-width: 640px) and (max-width: 899px) {
  .section { padding: 56px 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
/* Small phones */
@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .card { padding: 20px; }
  .btn-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card:hover { transition: none; transform: none; }
}

/* Spacing helpers and hero photos (kept out of inline styles for the Content Security Policy) */
[data-gap] { margin-top: 36px; }
[data-gap-sm] { margin-top: 18px; }
.bg-team { background-image: url(../assets/img/team-1600.jpg); }
.bg-planning { background-image: url(../assets/img/planning-1600.jpg); }
.bg-support { background-image: url(../assets/img/support-1600.jpg); }
.bg-community { background-image: url(../assets/img/community-1600.jpg); }
