/* Pinehood Cloud Services - aligned with ph-landing-page (_themes.scss) */
:root {
  color-scheme: light;
  /* Brand accent = landing --ph-accent-color / --ph-accent-dark-color */
  --purple-700: #01796f;
  --purple-600: #0f766e;
  --purple-500: #14b8a6;
  --pink-accent: #2dd4bf;
  --navy: #0f766e;
  --navy-deep: #042f2e;
  --text: #374151;
  --text-strong: #000000;
  --muted: #6b7280;
  --border: #e5e7eb;
  --surface: #ffffff;
  --bg: #f9fafb;
  --bg-highlight: #f3f4f6;
  --hero-surface: #ffffff;
  --link: #01796f;
  --security-panel: #f3f4f6;
  --security-heading: #111827;
  --radius: 12px;
  --card-radius: 1.125rem;
  --shadow:
    0 1px 2px rgba(0, 0, 0, 0.03), 0 6px 18px -8px rgba(7, 52, 56, 0.08);
  --shadow-hover:
    0 2px 4px rgba(0, 0, 0, 0.04), 0 10px 24px -10px rgba(7, 52, 56, 0.12);
  --font:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  --max: 1120px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --purple-700: #2d8f85;
  --purple-600: #3ba89e;
  --purple-500: #4fd1c5;
  --pink-accent: #6ee7d8;
  --navy: #2d8f85;
  --navy-deep: #134e4a;
  --text: #e5e5e5;
  --text-strong: #ffffff;
  --muted: #a3a3a3;
  --border: #3d3d3d;
  --surface: #1e1e1e;
  --bg: #121212;
  --bg-highlight: #0f0f0f;
  --hero-surface: #1e1e1e;
  --link: #5eead4;
  --security-panel: #0f0f0f;
  --security-heading: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 6px 18px -8px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.25), 0 10px 24px -10px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a {
  color: var(--purple-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--surface);
  color: var(--purple-700);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Site header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow:
    rgba(0, 0, 0, 0) 0 0 0 0,
    rgba(0, 0, 0, 0) 0 0 0 0,
    rgba(0, 0, 0, 0.1) 0 4px 6px -1px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--purple-700);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.logo-mark {
  flex-shrink: 0;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav-links a:hover {
  color: var(--purple-700);
  text-decoration: none;
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--purple-500);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--purple-500);
  outline-offset: 2px;
}

.theme-toggle-wide {
  width: auto;
  padding: 0.45rem 0.75rem;
  gap: 0.5rem;
}

.theme-toggle-label {
  font-size: 0.875rem;
  font-weight: 600;
}

.theme-toggle-icon svg {
  display: block;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--purple-500);
}

.nav-panel {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem 1.25rem 1.25rem;
}

.nav-panel.is-open {
  display: block;
}

.nav-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-panel .nav-actions-stack {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 880px) {
  .nav-links,
  .nav-actions {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .nav-panel {
    display: none !important;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--purple-500);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--purple-700);
  color: #fff;
}

.btn-primary:hover {
  background: #01665e;
  box-shadow: var(--shadow-hover);
}

[data-theme="dark"] .btn-primary:hover {
  background: var(--purple-600);
}

.btn-secondary {
  background: var(--surface);
  color: var(--purple-700);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--purple-500);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--purple-700);
}

.btn-outline-light {
  background: transparent;
  color: #ecfdf5;
  border-color: rgba(236, 253, 245, 0.45);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
}

.btn-navy-outline {
  background: transparent;
  color: #ecfdf5;
  border-color: rgba(236, 253, 245, 0.35);
}

.btn-navy-outline:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--hero-surface) 0%, var(--bg) 100%);
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.gradient-text {
  background: linear-gradient(120deg, var(--purple-700), var(--pink-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.hero-mock {
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(145deg, #134e4a, #0f172a);
  border-radius: var(--card-radius);
  padding: 1rem;
  box-shadow: 0 20px 50px rgba(7, 52, 56, 0.22);
}

.hero-mock-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.hero-mock-bar span {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #444;
}

.hero-mock-bar span:nth-child(1) {
  background: #ff5f57;
}

.hero-mock-bar span:nth-child(2) {
  background: #febc2e;
}

.hero-mock-bar span:nth-child(3) {
  background: #28c840;
}

.hero-mock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.hero-mock-card {
  height: 4.5rem;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(1, 121, 111, 0.55),
    rgba(45, 143, 133, 0.35)
  );
  box-shadow: 0 0 20px rgba(1, 121, 111, 0.25);
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.section-head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2rem;
}

.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  color: var(--purple-700);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

/* Service grid */
#services .service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 600px) {
  #services .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  #services .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border-radius: var(--card-radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(1, 121, 111, 0.22);
  text-decoration: none;
}

.service-card:focus-visible {
  outline: 2px solid var(--purple-500);
  outline-offset: 2px;
}

.service-card--tbd {
  cursor: default;
  border-style: dashed;
  border-color: var(--border);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
}

.service-card--tbd:hover {
  transform: none;
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.service-card--tbd .service-icon--tbd {
  background: rgba(92, 99, 112, 0.1);
  color: var(--muted);
}

[data-theme="dark"] .service-card--tbd .service-icon--tbd {
  background: rgba(154, 160, 166, 0.08);
}

.service-card--tbd h3 {
  color: var(--muted);
}

.service-card--tbd p {
  color: var(--muted);
  margin-bottom: 0;
}

.service-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-icon img {
  width: 28px;
  height: 28px;
  display: block;
}

/* Icon wells: blend accent into card surface (avoids flat lime / sickly mint) */
.tint-green {
  background: color-mix(in srgb, #059669 11%, var(--surface));
}

.tint-blue {
  background: #f0fdfa;
}

.tint-orange {
  background: #f0fdfa;
}

.tint-purple {
  background: #ccfbf1;
}

.tint-teal {
  background: color-mix(in srgb, var(--purple-500) 14%, var(--surface));
}

[data-theme="dark"] .tint-green {
  background: color-mix(in srgb, #34d399 16%, var(--surface));
}

[data-theme="dark"] .tint-teal {
  background: color-mix(in srgb, var(--purple-500) 22%, var(--surface));
}

.service-card h3 {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.service-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.service-card > .service-url {
  margin-top: auto;
}

.service-card-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.service-auth-note {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.55;
  line-height: 1.2;
}

.service-card .service-url {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--link);
  word-break: break-all;
}

.service-card:hover .service-url {
  text-decoration: underline;
}

/* Resources */
#resources {
  background: var(--bg);
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.resources-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  gap: 1.5rem;
}

.resources-col--legal {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.resources-col--legal .legal-note {
  margin-top: auto;
  padding-top: 0.75rem;
}

@media (min-width: 900px) {
  .resources-wrap {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .resources-col--legal {
    min-height: 100%;
  }

  .security-box.resources-col--trust {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .security-box.resources-col--trust .security-cards {
    flex: 1;
  }
}

.legal-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-row-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.legal-row-wrap .legal-row {
  flex: 1;
  min-width: 0;
}

.legal-row {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.legal-row:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.legal-row-icon {
  flex-shrink: 0;
  width: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-600);
}

.legal-row-body {
  flex: 1;
  min-width: 0;
}

.legal-row-body strong {
  display: block;
  font-size: 0.975rem;
}

.legal-row-body small {
  color: var(--muted);
  font-size: 0.8125rem;
}

.legal-row-wrap > .icon-btn {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--purple-700);
  cursor: pointer;
  text-decoration: none;
}

.icon-btn:hover {
  background: rgba(1, 121, 111, 0.08);
  text-decoration: none;
}

[data-theme="dark"] .icon-btn:hover {
  background: rgba(45, 143, 133, 0.15);
}

.security-box {
  background: var(--security-panel);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
}

.security-box h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--security-heading);
}

.security-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.security-item {
  display: flex;
  gap: 0.75rem;
  background: var(--surface);
  border-radius: 8px;
  padding: 0.85rem;
  border: 1px solid var(--border);
}

.dot {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-green {
  background: #a7f3d0;
}

.dot-blue {
  background: #99f6e4;
}

.dot-purple {
  background: #5eead4;
}

.security-item strong {
  display: block;
  font-size: 0.9rem;
}

.security-item span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--navy-deep), #0d9488);
  color: #ecfdf5;
  padding: 3rem 1.25rem;
  text-align: center;
}

.cta-inner {
  max-width: 40rem;
  margin: 0 auto;
}

.cta-band h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
}

.cta-band .highlight {
  color: #99f6e4;
}

.cta-band p {
  margin: 0 0 1.25rem;
  opacity: 0.92;
}

.cta-band-lede {
  margin: 0 !important;
}

/* Dark mode: navy tokens are light pastels — use a deep band so copy stays readable */
[data-theme="dark"] .cta-band {
  background: linear-gradient(135deg, #042f2e, #134e4a);
  color: var(--text);
}

[data-theme="dark"] .cta-band .highlight {
  color: var(--pink-accent);
}

[data-theme="dark"] .cta-band p {
  color: var(--muted);
  opacity: 1;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Footer — same tone as ph-landing-page footer */
.site-footer {
  background: var(--bg-highlight);
  color: var(--text);
  padding: 2.5rem 1.25rem 0;
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  display: grid;
  gap: 2rem;
}

@media (min-width: 640px) and (max-width: 959px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
    row-gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1.1fr);
    column-gap: 3rem;
    row-gap: 2rem;
    align-items: start;
  }
}

.footer-brand .logo {
  color: var(--purple-700);
  margin-bottom: 0.75rem;
}

.footer-brand p {
  margin: 0 0 1rem;
  line-height: 1.55;
}

.social {
  display: flex;
  gap: 0.5rem;
}

.social a {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.social a:hover {
  background: rgba(1, 121, 111, 0.1);
  color: var(--purple-700);
  text-decoration: none;
}

[data-theme="dark"] .social a {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

[data-theme="dark"] .social a:hover {
  background: rgba(45, 143, 133, 0.2);
  color: var(--pink-accent);
}

.footer-col h3 {
  margin: 0 0 0.75rem;
  color: var(--text-strong);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.45rem;
}

.footer-col a {
  color: var(--text);
}

.footer-col a:hover {
  color: var(--purple-700);
}

.footer-bottom {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}

.footer-bottom a {
  color: var(--muted);
  margin-left: 1rem;
}

.footer-bottom a:first-of-type {
  margin-left: 0;
}

.footer-bottom a:hover {
  color: var(--purple-700);
}

/* Legal subpages */
.legal-top {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.legal-top a {
  font-weight: 600;
  color: var(--purple-700);
}

.legal-top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-size: 0.9rem;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.legal-top nav a {
  font-weight: 500;
  color: var(--text);
}

.legal-top nav a[aria-current="page"] {
  color: var(--purple-700);
  text-decoration: underline;
}

.legal-page {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-main {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  width: 100%;
}

.legal-main h1 {
  margin: 0 0 0.5rem;
  color: var(--purple-700);
}

.legal-meta {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
}

.legal-download {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.legal-download > p:first-child {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.legal-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.legal-copyurl {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

.legal-copyurl code {
  display: block;
  margin-top: 0.35rem;
  padding: 0.5rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.78rem;
  word-break: break-all;
  user-select: all;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.doc-iframe {
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.legal-note {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 1rem;
}

.legal-footer-mini {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.legal-footer-mini a {
  margin-right: 1rem;
}
