/* =========================================================
   Roy Solutions — styles.css
   Best-practices cleanup (no visual changes intended)
   ========================================================= */

/* -----------------------------
   Design tokens
------------------------------ */

:root {
  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  --text-base: 17px;

  /* Brand */
  --brand: #124570;
  --brand-hover: #0f3a5e;
  --brand-soft: #e7eef6;

  /* Neutrals */
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #16212b;
  --muted: #465564;
  --border: #d9e1ea;

  /* Radius + shadows */
  --radius: 10px;
  --shadow: 0 6px 20px rgba(10, 20, 30, 0.06);
  --shadow-work: 0 10px 24px rgba(0, 0, 0, 0.18);

  /* Spacing scale */
  --s-1: 0.5rem;
  --s-2: 0.75rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2rem;
  --s-6: 3rem;
  --s-7: 4.5rem;

  /* Breakpoints */
  --bp-container: 800px;
  --bp-desktop: 900px;

  /* Component colors (derived) */
  --header-border: rgba(255, 255, 255, 0.18);
  --work-card-bg: rgba(255, 255, 255, 0.08);
  --work-card-border: rgba(255, 255, 255, 0.12);

  --divider-brand: rgba(18, 69, 112, 0.18);
  --row-hover: rgba(18, 69, 112, 0.05);

  /* Focus ring (accessibility) */
  --focus-ring: 0 0 0 3px rgba(18, 69, 112, 0.28);
}

/* -----------------------------
   Base / Reset
------------------------------ */

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

html {
  font-size: var(--text-base);
  background: var(--brand);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--text);
  background: var(--brand);
}

main {
  background: var(--bg);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

p {
  margin: 0 0 var(--s-3);
}

h1,
h2,
h3 {
  margin: 0 0 var(--s-3);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
h3 { font-size: 1.1rem; }

section h2 {
  margin-top: 0;
  margin-bottom: var(--s-4);
  text-align: center;
}

/* Links */
a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

/* Focus visibility (keyboard users) */
a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* -----------------------------
   Layout primitives
------------------------------ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--s-4) var(--s-3);
}

.services-intro {
  max-width: 65ch;
  margin: 0 auto var(--s-3);
  text-align: center;
  color: var(--muted);
}

/* =========================================================
   Header (locked)
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brand);
  border-bottom: 1px solid var(--header-border);
}

/* IMPORTANT:
   header-inner/footer-inner include .container in HTML,
   so we override container padding here to avoid huge vertical padding,
   while keeping sane horizontal gutters. */
.header-inner {
  padding: var(--s-2) var(--s-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.brand-link {
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}

.brand-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  white-space: nowrap;
}

.phone-link {
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
}

.phone-link:hover {
  text-decoration: underline;
}

.phone-link,
.phone-link:visited,
.phone-link:hover,
.phone-link:active {
  color: #ffffff;
}

.phone-label {
  color: #ffffff;
}

/* =========================================================
   Hero (locked)
   ========================================================= */

.hero {
  background: var(--bg);
}

.hero .container {
  padding-top: var(--s-4);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.hero-copy {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.hero-copy p {
  line-height: 1.55;
}

/* Default: keep the break (your current behavior) */
.hero-title-break {
  display: inline;
}

/* iPad-ish widths: remove the break so the H1 becomes one line */
@media (min-width: 744px) and (max-width: 900px) {
  .hero-title-break {
    display: none;
  }

  .hero-text h1 {
  letter-spacing: -0.015em;
  }
}

.hero-subtitle {
  color: var(--text);
  margin-bottom: var(--s-3);
}

.hero-text h1 {
  color: var(--brand);
  margin-top: 0;
  margin-bottom: var(--s-3);
  white-space: nowrap;
  font-size: clamp(2.2rem, 4.2vw, 3rem);
}

.hero-text h2 {
  margin-bottom: var(--s-3);
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
}

.hero-text p {
  margin-bottom: var(--s-2);
}

.hero-lede {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}

.hero-body,
.hero-goal {
  color: var(--text);
}

.hero-cta-wrap {
  margin-top: var(--s-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}

.hero-cta-buttons {
  display: flex;
  gap: var(--s-3);
  width: 100%;
  max-width: 20rem;
}

.hero-cta-buttons .hero-cta-button {
  flex: 1;
  max-width: none; /* override your 32rem cap per-button */
}

.hero-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  padding: var(--s-3) var(--s-5);

  border-radius: calc(var(--radius) + 2px);
  background: var(--brand);
  color: #ffffff;

  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;

  box-shadow: var(--shadow);
}

.hero-cta-button:hover {
  background: var(--brand-hover);
  color: #ffffff;
  text-decoration: none;
}

.hero-cta-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.hero-cta-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-cta-note a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: underline;
}

.hero-cta-note a:hover {
  color: var(--brand-hover);
}

.hero-visual {
  margin-left: auto;
  margin-right: auto;
}

.portrait {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;

  border-radius: var(--radius);
  overflow: hidden;

  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.portrait img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   How I Work (locked/approved)
   ========================================================= */

.how-i-work {
  background: var(--brand);
  color: #ffffff;
  padding: var(--s-3) 0;
}

.work-cards {
  max-width: 1100px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

.work-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  padding: var(--s-4);
  border-radius: var(--radius);

  background: var(--work-card-bg);
  border: 1px solid var(--work-card-border);
  box-shadow: var(--shadow-work);
}

.work-card-title {
  font-size: clamp(1.25rem, 1.25vw, 1.45rem);
  line-height: 1.15;
  margin-bottom: var(--s-2);
}

.work-card-body {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 34ch;
}

/* =========================================================
   Services (panel + contrast, locked direction)
   ========================================================= */

.services {
  background: var(--bg);
}

.services .container {
  padding-top: var(--s-5);
  padding-bottom: var(--s-5);
}

.services h2 {
  text-align: center;
  margin-bottom: var(--s-3);
}

.services-subhead {
  text-align: center;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: var(--s-4);
}

.services-list {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--s-3) var(--s-4);

  list-style: none;

  display: grid;
  grid-template-columns: 1fr;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.services-list li {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--divider-brand);

  font-size: 1.05rem;
  line-height: 1.5;
  text-align: left;

  transition: background-color 140ms ease;
}

.services-list li:last-child {
  border-bottom: none;
}

@media (hover: hover) and (pointer: fine) {
  .services-list li:hover {
    background: var(--row-hover);
  }
}

/* =========================================================
   Footer (locked)
   ========================================================= */

.site-footer {
  background: var(--brand);
  border-top: 1px solid var(--header-border);
}

.footer-inner {
  padding: var(--s-2) var(--s-3);

  display: flex;
  flex-direction: column;        /* stack by default */
  align-items: center;           /* center items */
  justify-content: center;
  text-align: center;

  gap: var(--s-1);               /* tight, intentional */
}

.footer-brand,
.footer-contact {
  margin: 0;
  color: #ffffff;
}

.footer-contact:visited,
.footer-contact:hover,
.footer-contact:active {
  color: #ffffff;
}

.site-footer a {
  color: #ffffff;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* =========================================================
   Breakpoints (consolidated)
   ========================================================= */

@media (min-width: 900px) {
  .container {
    padding: var(--s-5) var(--s-4);
  }

  /* Header/Footer horizontal gutters track container gutters */
  .header-inner,
  .footer-inner {
    padding-left: var(--s-6);
    padding-right: var(--s-6);
    padding-top: var(--s-1);
    padding-bottom: var(--s-1);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    gap: var(--s-2) var(--s-4);
  }

  /* Hero desktop layout */
  .hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    column-gap: var(--s-6);
    align-items: start;
  }

  .hero-copy {
    max-width: 80%;
  }

  .hero-cta-button {
    width: auto;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  .portrait {
    max-width: 395px;
  }

  /* How I Work desktop symmetry */
  .work-cards {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }

  .work-card {
    height: 100%;
  }

  .work-card-title {
    white-space: nowrap;
  }

  /* Services desktop (2 columns + your tighter padding) */
  .services-list {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--s-6);
    row-gap: 0;
    padding: var(--s-1) var(--s-5); /* your tweak */
  }

  .services-list li {
    border-bottom: none;
    border-top: 1px solid var(--divider-brand);
  }

  .services-list li:nth-child(-n + 2) {
    border-top: none;
  }
}
