/* ============================================================
   Cloud Realm LLC — Styles
   ============================================================ */

/* --- Reset --- */
*,
*::before,
*::after {
   box-sizing: border-box;
   margin: 0;
   padding: 0;
}
html {
   scroll-behavior: smooth;
   scroll-padding-top: 5rem;
}
body {
   font-family:
      "Inter",
      system-ui,
      -apple-system,
      sans-serif;
   line-height: 1.6;
   -webkit-font-smoothing: antialiased;
}
img {
   max-width: 100%;
   display: block;
}
a {
   color: inherit;
   text-decoration: none;
}
ul {
   list-style: none;
}
button {
   cursor: pointer;
   border: none;
   background: none;
   font: inherit;
}

/* --- CSS Custom Properties --- */
:root {
   --color-primary: #0554bd;
   --color-accent: #10b981;
   --color-bg: #fafafa;
   --color-bg-card: #ffffff;
   --color-bg-alt: #f3f4f6;
   --color-nav-bg: rgba(250, 250, 250, 0.8);
   --color-text-heading: #0f172a;
   --color-text-body: #374151;
   --color-text-muted: #6b7280;
   --color-border: #e5e7eb;
   --font-heading: "Inter", system-ui, sans-serif;
   --font-body: "Inter", system-ui, sans-serif;
   --radius: 0.75rem;
   --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
   --shadow-md:
      0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
   --max-width: 64rem;
   --nav-height: 4rem;
}

[data-theme="dark"] {
   --color-bg: #0f172a;
   --color-bg-card: #1e293b;
   --color-bg-alt: #1e293b;
   --color-nav-bg: rgba(15, 23, 42, 0.8);
   --color-text-heading: #f1f5f9;
   --color-text-body: #94a3b8;
   --color-text-muted: #7d8fa3;
   --color-border: #334155;
   --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
   --shadow-md:
      0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
   :root:not([data-theme="light"]) {
      --color-bg: #0f172a;
      --color-bg-card: #1e293b;
      --color-bg-alt: #1e293b;
      --color-nav-bg: rgba(15, 23, 42, 0.8);
      --color-text-heading: #f1f5f9;
      --color-text-body: #94a3b8;
      --color-text-muted: #7d8fa3;
      --color-border: #334155;
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
      --shadow-md:
         0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
   }
}

body {
   background-color: var(--color-bg);
   color: var(--color-text-body);
}

/* --- Utility --- */
.container {
   max-width: var(--max-width);
   margin: 0 auto;
   padding: 0 1.5rem;
}

.sr-only {
   position: absolute;
   width: 1px;
   height: 1px;
   padding: 0;
   margin: -1px;
   overflow: hidden;
   clip: rect(0, 0, 0, 0);
   white-space: nowrap;
   border: 0;
}

/* Skip to content link (WCAG 2.4.1) */
.skip-link {
   position: absolute;
   top: -100%;
   left: 1rem;
   z-index: 200;
   padding: 0.75rem 1.5rem;
   background: var(--color-primary);
   color: #fff;
   border-radius: var(--radius);
   font-weight: 600;
   font-size: 0.875rem;
   transition: top 0.2s;
}

.skip-link:focus {
   top: 1rem;
}

/* Focus styles (WCAG 2.4.7) */
:focus-visible {
   outline: 2px solid var(--color-primary);
   outline-offset: 2px;
   border-radius: 2px;
}

/* Reduced motion (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
   *, *::before, *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
   }
   .reveal {
      opacity: 1;
      transform: none;
   }
}

/* --- Navigation --- */
.nav {
   position: sticky;
   top: 0;
   z-index: 100;
   background: var(--color-nav-bg);
   backdrop-filter: blur(12px);
   -webkit-backdrop-filter: blur(12px);
   border-bottom: 1px solid var(--color-border);
   height: var(--nav-height);
}

.nav-inner {
   max-width: var(--max-width);
   margin: 0 auto;
   padding: 0 1.5rem;
   height: 100%;
   display: flex;
   align-items: center;
   justify-content: space-between;
}

.nav-brand {
   font-weight: 700;
   font-size: 1.125rem;
   color: var(--color-text-heading);
   display: flex;
   align-items: center;
   gap: 0.5rem;
}

.nav-logo {
   height: 8rem;
   width: auto;
}

.nav-brand-text {
   font-weight: 700;
   font-size: 1.0625rem;
   color: var(--color-text-heading);
}

@media (max-width: 768px) {
   .nav-brand-text {
      display: none;
   }
}

.nav-links {
   display: flex;
   gap: 2rem;
   align-items: center;
}

.nav-link {
   font-size: 0.875rem;
   font-weight: 500;
   color: var(--color-text-muted);
   transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
   color: var(--color-primary);
}

.nav-link--cta {
   color: var(--color-accent);
   font-weight: 600;
}

.nav-link--cta:hover {
   color: var(--color-accent);
   opacity: 0.8;
}

/* Hamburger */
.nav-toggle {
   display: none;
   flex-direction: column;
   gap: 5px;
   padding: 0.5rem;
}

.hamburger-line {
   display: block;
   width: 22px;
   height: 2px;
   background: var(--color-text-heading);
   border-radius: 2px;
   transition:
      transform 0.3s,
      opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
   transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
   opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
   transform: translateY(-7px) rotate(-45deg);
}

/* Theme toggle */
.theme-toggle {
   padding: 0.5rem;
   border-radius: 50%;
   transition: background 0.2s;
}

.theme-toggle:hover {
   background: var(--color-bg-alt);
}

.theme-icon::after {
   content: "☀️";
   font-size: 1.125rem;
}

[data-theme="dark"] .theme-icon::after {
   content: "🌙";
}

@media (prefers-color-scheme: dark) {
   :root:not([data-theme="light"]) .theme-icon::after {
      content: "🌙";
   }
}

/* --- Buttons --- */
.btn {
   display: inline-block;
   padding: 0.75rem 1.5rem;
   border-radius: var(--radius);
   font-weight: 600;
   font-size: 0.9375rem;
   transition:
      transform 0.2s,
      box-shadow 0.2s,
      opacity 0.2s;
}

.btn:hover {
   transform: translateY(-1px);
   box-shadow: var(--shadow-md);
}

.btn-primary {
   background: var(--color-primary);
   color: #fff;
}

.btn-primary:hover {
   opacity: 0.9;
}

.btn-lg {
   padding: 1rem 2rem;
   font-size: 1.0625rem;
}

/* --- Sections --- */
.section {
   padding: 5rem 0;
}

.section--alt {
   background: var(--color-bg-alt);
}

.section--cta {
   padding: 4rem 0;
   background: var(--color-bg-card);
   border-top: 1px solid var(--color-border);
   border-bottom: 1px solid var(--color-border);
   text-align: center;
}

.section-heading {
   font-family: var(--font-heading);
   font-size: 2rem;
   font-weight: 800;
   color: var(--color-text-heading);
   margin-bottom: 2.5rem;
}

.section-subheading {
   font-size: 1.125rem;
   color: var(--color-text-muted);
   margin-top: -2rem;
   margin-bottom: 2.5rem;
}

/* --- Hero --- */
.hero {
   min-height: calc(100vh - var(--nav-height));
   display: flex;
   align-items: center;
   justify-content: center;
   text-align: center;
   padding: 4rem 0;
}

.hero-headline {
   font-family: var(--font-heading);
   font-size: clamp(2rem, 5vw, 3.25rem);
   font-weight: 800;
   color: var(--color-text-heading);
   line-height: 1.15;
   margin-bottom: 1rem;
}

.hero-subhead {
   font-size: clamp(1.125rem, 2.5vw, 1.375rem);
   font-weight: 500;
   color: var(--color-text-heading);
   margin-bottom: 1.5rem;
}

.hero-description {
   font-size: 1.0625rem;
   color: var(--color-text-body);
   max-width: 42rem;
   margin: 0 auto 2rem;
   line-height: 1.7;
}

.hero-cta {
   margin-bottom: 2rem;
}

.hero-credibility {
   font-size: 0.875rem;
   color: var(--color-text-muted);
   font-weight: 500;
}

/* --- Focus Areas Grid --- */
.focus-areas-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
   gap: 1.25rem;
}

.focus-area-card {
   background: var(--color-bg-card);
   border: 1px solid var(--color-border);
   border-radius: var(--radius);
   padding: 1.5rem;
   box-shadow: var(--shadow-sm);
}

.focus-area-card h3 {
   font-size: 1rem;
   font-weight: 700;
   color: var(--color-text-heading);
   margin-bottom: 0.5rem;
}

.focus-area-card p {
   font-size: 0.875rem;
   color: var(--color-text-muted);
   line-height: 1.5;
}

/* --- Steps --- */
.steps {
   max-width: 40rem;
}

.step {
   padding: 1.5rem 0 1.5rem 2rem;
   border-left: 3px solid var(--color-border);
   position: relative;
}

.step::before {
   content: attr(data-number);
   position: absolute;
   left: -0.85rem;
   top: 1.5rem;
   width: 1.5rem;
   height: 1.5rem;
   background: var(--color-primary);
   color: #fff;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 0.75rem;
   font-weight: 700;
}

.step h3 {
   font-size: 1.125rem;
   font-weight: 700;
   color: var(--color-text-heading);
   margin-bottom: 0.375rem;
}

.step p {
   font-size: 0.9375rem;
   color: var(--color-text-body);
}

/* --- Proof --- */
.proof-section-label {
   font-size: 0.75rem;
   font-weight: 700;
   letter-spacing: 0.1em;
   text-transform: uppercase;
   color: var(--color-primary);
   margin-bottom: 0.5rem;
}

.proof-org {
   font-size: 1.125rem;
   font-weight: 600;
   color: var(--color-text-heading);
}

.proof-role {
   font-size: 0.875rem;
   color: var(--color-text-muted);
   margin-bottom: 1.5rem;
}

.metrics-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
   gap: 1.25rem;
   margin-bottom: 2rem;
}

.metric-card {
   background: var(--color-bg-card);
   border: 1px solid var(--color-border);
   border-radius: var(--radius);
   padding: 1.5rem;
   text-align: center;
   box-shadow: var(--shadow-sm);
}

.metric-value {
   font-size: 2.5rem;
   font-weight: 800;
   color: var(--color-primary);
   line-height: 1;
   margin-bottom: 0.5rem;
}

.metric-label {
   font-size: 0.875rem;
   color: var(--color-text-muted);
}

.proof-bullets {
   margin-bottom: 2.5rem;
}

.proof-bullets li {
   padding: 0.375rem 0;
   padding-left: 1.25rem;
   position: relative;
   font-size: 0.9375rem;
   color: var(--color-text-body);
}

.proof-bullets li::before {
   content: "•";
   position: absolute;
   left: 0;
   color: var(--color-accent);
   font-weight: 700;
}

.proof-divider {
   border: none;
   border-top: 1px solid var(--color-border);
   margin: 2rem 0;
}

/* --- Principles (How I Work) --- */
.principles {
   max-width: 40rem;
   display: flex;
   flex-direction: column;
   gap: 1.5rem;
}

.principle h3 {
   font-size: 1rem;
   font-weight: 700;
   color: var(--color-text-heading);
   margin-bottom: 0.25rem;
}

.principle p {
   font-size: 0.9375rem;
   color: var(--color-text-body);
}

/* --- CTA Section --- */
.cta-heading {
   font-family: var(--font-heading);
   font-size: 1.75rem;
   font-weight: 800;
   color: var(--color-text-heading);
   margin-bottom: 2rem;
}

.start-here-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
   gap: 2rem;
   text-align: left;
}

.start-here-option {
   background: var(--color-bg-card);
   border: 1px solid var(--color-border);
   border-radius: var(--radius);
   padding: 2rem;
   box-shadow: var(--shadow-sm);
}

.start-here-title {
   font-size: 0.9375rem;
   color: var(--color-text-muted);
   margin-bottom: 0.5rem;
}

.start-here-name {
   font-size: 1.25rem;
   font-weight: 700;
   color: var(--color-text-heading);
   margin-bottom: 0.75rem;
}

.start-here-desc {
   font-size: 0.9375rem;
   color: var(--color-text-body);
   line-height: 1.7;
   margin-bottom: 1.5rem;
}

/* --- About --- */
.about-headshot {
   width: 5rem;
   height: 5rem;
   border-radius: 50%;
   object-fit: cover;
   margin-bottom: 1.5rem;
   border: 2px solid var(--color-border);
}

.about-content p {
   font-size: 1rem;
   color: var(--color-text-body);
   margin-bottom: 1rem;
   max-width: 40rem;
   line-height: 1.7;
}

.about-content a {
   color: var(--color-primary);
   font-weight: 600;
   transition: opacity 0.2s;
}

.about-content a:hover {
   opacity: 0.7;
}

/* --- Footer --- */
.footer {
   padding: 3rem 0;
   border-top: 1px solid var(--color-border);
   text-align: center;
}

.footer-content {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 0.75rem;
}

.footer-links {
   display: flex;
   gap: 1.5rem;
   flex-wrap: wrap;
   justify-content: center;
}

.footer-links a {
   font-size: 0.875rem;
   color: var(--color-text-muted);
   transition: color 0.2s;
}

.footer-links a:hover {
   color: var(--color-primary);
}

.footer-copy {
   font-size: 0.8125rem;
   color: var(--color-text-muted);
}

/* --- Scroll Reveal --- */
.reveal {
   opacity: 0;
   transform: translateY(1.5rem);
   transition:
      opacity 0.6s ease,
      transform 0.6s ease;
}

.reveal.revealed {
   opacity: 1;
   transform: translateY(0);
}

/* --- Sticky Mobile CTA --- */
.sticky-cta {
   display: none;
   position: fixed;
   bottom: 0;
   left: 0;
   right: 0;
   z-index: 90;
   padding: 0.75rem 1.5rem;
   background: var(--color-bg-card);
   border-top: 1px solid var(--color-border);
   text-align: center;
   transform: translateY(100%);
   transition: transform 0.3s ease;
}

.sticky-cta.visible {
   transform: translateY(0);
}

.sticky-cta .btn {
   width: 100%;
   max-width: 20rem;
}

@media (max-width: 768px) {
   .sticky-cta {
      display: block;
   }
}

/* --- Responsive --- */
@media (max-width: 768px) {
   .nav-links {
      display: none;
      flex-direction: column;
      position: absolute;
      top: var(--nav-height);
      left: 0;
      right: 0;
      background: var(--color-bg-card);
      border-bottom: 1px solid var(--color-border);
      padding: 1.5rem;
      gap: 1.25rem;
      box-shadow: var(--shadow-md);
   }

   .nav-links.open {
      display: flex;
   }

   .nav-toggle {
      display: flex;
   }

   .hero {
      padding: 4rem 0 3rem;
   }

   .section {
      padding: 3.5rem 0;
   }

   .section-heading {
      font-size: 1.625rem;
   }

   .focus-areas-grid {
      grid-template-columns: 1fr;
   }

   .metrics-grid {
      grid-template-columns: 1fr;
   }
}

@media (min-width: 769px) and (max-width: 1024px) {
   .focus-areas-grid {
      grid-template-columns: repeat(2, 1fr);
   }
}
