/* ==========================================================================
   Ryan IT Solutions 4U — main stylesheet
   Colours live in :root so the whole site can be re-themed in one place.
   ========================================================================== */

:root {
  --red: #d7191f;
  --red-dark: #a50f14;
  --red-light: #fdecec;
  --white: #ffffff;
  --grey-bg: #f6f6f6;
  --grey-line: #e6e6e6;
  --text: #1a1a1a;
  --text-muted: #555555;
  --footer-bg: #141414;

  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 16px 40px rgba(215, 25, 31, 0.18);
  --container: 1180px;
  --header-h: 76px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
}

p { margin: 0 0 1em; }

a { color: var(--red); }
a:hover { color: var(--red-dark); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: var(--white);
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 16px; top: 16px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) { .container { padding: 0 24px; } }

.section { padding: 80px 0; }
.section--grey { background: var(--grey-bg); }
@media (max-width: 640px) { .section { padding: 56px 0; } }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.section-head p { color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-2px); }

.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); color: var(--white); }

.btn--white { background: var(--white); color: var(--red); }
.btn--white:hover { background: var(--red-light); color: var(--red-dark); }

.btn--outline-white { border-color: var(--white); color: var(--white); background: transparent; }
.btn--outline-white:hover { background: var(--white); color: var(--red); }

.btn--outline-red { border-color: var(--red); color: var(--red); background: transparent; }
.btn--outline-red:hover { background: var(--red); color: var(--white); }

.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--grey-line);
  transition: box-shadow 0.2s;
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo img { width: 44px; height: 44px; }
.logo-text { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.logo-text span { color: var(--red); }
.logo-text small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav a {
  display: block;
  padding: 10px 14px;
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
}
.main-nav a:hover { color: var(--red); }
.main-nav a[aria-current="page"] { color: var(--red); }
.main-nav .nav-cta { margin-left: 8px; }
.main-nav .nav-cta a { background: var(--red); color: var(--white); border-radius: 999px; padding: 10px 20px; }
.main-nav .nav-cta a:hover { background: var(--red-dark); color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 3px solid var(--red);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 2px; }
  .main-nav a { padding: 14px 12px; }
  .main-nav .nav-cta { margin: 10px 0 0; }
  .main-nav .nav-cta a { text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.12) 0, transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(0, 0, 0, 0.18) 0, transparent 45%),
    linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  overflow: hidden;
}
.hero::after {
  /* subtle circuit-grid texture */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 96px;
  padding-bottom: 96px;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; }
.hero p.lead { font-size: 1.2rem; opacity: 0.95; max-width: 560px; margin-bottom: 32px; }
.hero .eyebrow { color: var(--white); opacity: 0.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-card {
  background: var(--white);
  color: var(--text);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}
.hero-card h2 { font-size: 1.3rem; }
.hero-card ul { list-style: none; margin: 0 0 24px; padding: 0; }
.hero-card li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--grey-line); }
.hero-card li:last-child { border-bottom: 0; }
.hero-card .tick { flex: 0 0 24px; height: 24px; color: var(--red); }
.hero-card .phone-big {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--red);
  text-decoration: none;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 80px; }
}

/* Smaller page banner used on inner pages */
.page-banner { position: relative; color: var(--white); background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%); overflow: hidden; }
.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.page-banner .container { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 72px; }
.page-banner h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 0.3em; }
.page-banner p { font-size: 1.15rem; max-width: 640px; opacity: 0.95; margin: 0; }
.breadcrumb { font-size: 0.9rem; margin-bottom: 12px; opacity: 0.9; }
.breadcrumb a { color: var(--white); }

/* ---------- Two-column split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.split p { color: var(--text-muted); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }

.feature-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--red-light), var(--white));
  border: 1px solid var(--grey-line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.feature-visual svg { width: 70%; height: auto; }
.feature-badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-family: var(--font-head);
  font-weight: 600;
  box-shadow: var(--shadow);
}
.feature-badge strong { display: block; font-size: 1.6rem; line-height: 1; }

.checklist { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; }
.checklist .tick {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: grid;
  place-items: center;
}
.checklist .tick svg { width: 16px; height: 16px; }
.checklist strong { display: block; font-family: var(--font-head); }
.checklist span.desc { color: var(--text-muted); font-size: 0.97rem; }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
@media (min-width: 641px) and (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--red-light);
  color: var(--red);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  transition: background 0.25s, color 0.25s;
}
.card:hover .card-icon { background: var(--red); color: var(--white); }
.card-icon svg { width: 32px; height: 32px; }
.card h3 { font-size: 1.3rem; }
.card p { color: var(--text-muted); flex: 1; }
.card-link {
  font-family: var(--font-head);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link svg { width: 18px; height: 18px; transition: transform 0.2s; }
.card-link:hover svg { transform: translateX(4px); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  padding: 64px 0;
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.3em; }
.cta-inner p { margin: 0; opacity: 0.95; max-width: 620px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-info h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); }
.contact-info p { color: var(--text-muted); }

.contact-items { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.contact-items li { display: flex; gap: 16px; align-items: center; }
.contact-items .ci-icon {
  flex: 0 0 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--red);
  color: var(--white);
  display: grid;
  place-items: center;
}
.contact-items .ci-icon svg { width: 24px; height: 24px; }
.contact-items small { display: block; color: var(--text-muted); font-size: 0.85rem; }
.contact-items a, .contact-items .ci-value {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  word-break: break-word;
}
.contact-items a:hover { color: var(--red); }


.contact-panel {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow: var(--shadow-hover);
}
.contact-panel h3 { font-size: 1.5rem; margin-bottom: 8px; }
.contact-panel-phone {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.1;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 18px;
}
.contact-panel-phone:hover { color: var(--white); text-decoration: underline; }
.contact-panel p { opacity: 0.95; margin-bottom: 26px; }
.contact-panel-actions { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 640px) { .contact-panel { padding: 32px 22px; } }

/* ---------- Services detail page ---------- */
.service-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.service-detail.reverse .service-visual { order: 2; }
@media (max-width: 900px) {
  .service-detail { grid-template-columns: 1fr; gap: 32px; }
  .service-detail.reverse .service-visual { order: 0; }
}
.service-detail h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); }
.service-detail > div > p { color: var(--text-muted); }

.service-visual {
  aspect-ratio: 5 / 4;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.service-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}
.service-visual svg { width: 38%; height: auto; position: relative; z-index: 1; }

.pill-list { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .pill-list { grid-template-columns: 1fr; } }
.pill-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--grey-bg);
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 500;
}
.section--grey .pill-list li { background: var(--white); }
.pill-list svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--red); }

/* ---------- About page ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }
.value {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.value .card-icon { margin: 0 auto 18px; }
.value h3 { font-size: 1.15rem; }
.value p { color: var(--text-muted); font-size: 0.97rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: #cfcfcf; border-top: 5px solid var(--red); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 40px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 { color: var(--white); font-size: 1.05rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: #cfcfcf; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer .logo { color: var(--white); margin-bottom: 16px; }
.site-footer .logo-text small { color: #a8a8a8; }
.site-footer .logo-text span { color: #ff4a4f; }
.footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Reveal-on-scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .card::before, .card-link svg { transition: none; }
}
