/* ==========================================================================
   Simulation Red — Site styles
   Adjust the variables below to match your stylistic preferences.
   ========================================================================== */

:root {
  /* Brand: deep red (closer to blood red, not pink) */
  --color-red: #b91c1c;
  --color-red-dark: #991b1b;
  --color-red-light: #dc2626;
  --color-red-muted: rgba(185, 28, 28, 0.14);
  --color-red-muted-strong: rgba(185, 28, 28, 0.24);

  /* Neutrals */
  --color-black: #0d0d0d;
  --color-gray-900: #1a1a1a;
  --color-gray-700: #3d3d3d;
  --color-gray-500: #6b6b6b;
  --color-gray-300: #a3a3a3;
  --color-gray-100: #e5e5e5;
  --color-white: #fafafa;

  /* Backgrounds */
  --bg-page: #f5f5f5;
  --bg-card: #ffffff;
  --bg-hero: #0d0d0d;
  --bg-footer: #1a1a1a;

  /* Typography */
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --text-primary: #0d0d0d;
  --text-secondary: #3d3d3d;
  --text-muted: #6b6b6b;
  --text-inverse: #fafafa;

  /* Spacing & layout */
  --container-max: 960px;
  --section-padding: clamp(3rem, 6vw, 5rem);
  --gap: 1.5rem;

  /* Borders & radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Transitions */
  --ease: 0.2s ease;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-red); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--color-red-dark); }
ul { list-style: none; margin: 0; padding: 0; }

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Brand name: Simulation (black) Red (red) */
.brand-simulation { color: var(--color-black); }
.brand-red { color: var(--color-red); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--color-gray-100);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  gap: 1rem;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
}
.logo-link:hover { color: inherit; }
.site-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.brand-text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.main-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover { color: var(--color-red); }
.nav-toggle {
  display: none;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  border-radius: var(--radius-sm);
}
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--ease);
}
.nav-toggle::before { top: 0.55rem; }
.nav-toggle::after { bottom: 0.55rem; }
.nav-toggle[aria-expanded="true"]::before {
  transform: translateY(0.35rem) rotate(45deg);
}
.nav-toggle[aria-expanded="true"]::after {
  transform: translateY(-0.35rem) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: var(--section-padding) 0;
  background: var(--bg-hero);
  color: var(--text-inverse);
  text-align: center;
}
.hero .brand-simulation { color: #fff; }
.hero .brand-red { color: var(--color-red-light); }
.hero-logo-wrap {
  margin-bottom: 1rem;
}
.hero-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  object-fit: contain;
  filter: brightness(1.1);
}
.hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hero-tagline {
  margin: 0;
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1rem;
  color: var(--color-gray-300);
  line-height: 1.5;
}

/* ==========================================================================
   Sections (shared)
   ========================================================================== */
.section {
  padding: var(--section-padding) 0;
}
.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.section-title .brand-red { color: var(--color-red); }
.section-intro {
  margin: 0 0 2rem;
  max-width: 60ch;
  color: var(--text-secondary);
  font-size: 1.05rem;
}
.subsection-title {
  margin-top: 2.5rem;
}

/* ==========================================================================
   Services
   ========================================================================== */
.section-services { background: var(--bg-card); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}
.service-card {
  padding: 1.5rem;
  background: var(--bg-page);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-md);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.service-card:hover {
  border-color: var(--color-red-muted-strong);
  box-shadow: 0 4px 20px var(--color-red-muted);
}
.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-red-dark);
}
.service-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Why Us
   ========================================================================== */
.why-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.why-list li {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border-left: 4px solid var(--color-red);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.why-list h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}
.why-list p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Understanding risk (long-form)
   ========================================================================== */
.section-understanding {
  background: var(--bg-page);
}
.understanding-prose {
  max-width: 42rem;
  margin: 0 auto;
}
.understanding-prose p {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.understanding-prose p:last-child {
  margin-bottom: 0;
}
.understanding-prose h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}
.understanding-prose h3:first-child {
  margin-top: 0;
}
.understanding-prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: var(--color-red-muted);
  border-radius: var(--radius-sm);
  color: var(--color-red-dark);
}

/* ==========================================================================
   Portfolio
   ========================================================================== */
.section-portfolio { background: var(--bg-card); }
.section-portfolio .container {
  text-align: center;
}
.section-portfolio .section-title {
  margin-left: auto;
  margin-right: auto;
}
.portfolio-bubble {
  max-width: 28rem;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  background: var(--bg-page);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 0 4px 24px var(--color-red-muted);
}
.portfolio-bubble-text {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}
.portfolio-bubble .btn-primary {
  text-decoration: none;
  color: #fff;
}
.portfolio-bubble .btn-primary:hover {
  color: #fff;
}

/* ==========================================================================
   Contact form
   ========================================================================== */
.contact-form {
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-row label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-sm);
  transition: border-color var(--ease);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-red);
}
.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--text-muted);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease);
}
.btn-primary {
  background: var(--color-red);
  color: #fff;
  align-self: flex-start;
}
.btn-primary:hover {
  background: var(--color-red-dark);
  color: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 2rem 0;
  background: var(--bg-footer);
  color: var(--text-inverse);
  text-align: center;
}
.site-footer .brand-simulation { color: #fff; }
.site-footer .brand-red { color: var(--color-red-light); }
.footer-brand {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
}
.footer-copy {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-gray-300);
}

/* ==========================================================================
   Mobile nav
   ========================================================================== */
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--color-gray-100);
    gap: 0.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--ease), opacity var(--ease), visibility var(--ease);
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav a { padding: 0.5rem 0; }
}
