/* ================================================
   iSimpli5 — Design System
   "Modern Premium — American Precision"
   ================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Outfit:wght@600;700&display=swap');

/* --- Custom Properties --- */
:root {
  /* Colors */
  --bg: #111111;
  --bg-elevated: #1a1a1a;
  --bg-card: #161616;
  --text: #f0ece4;
  --text-muted: #9e9a93;
  --text-dim: #6b6760;
  --accent: #b87333;
  --accent-hover: #d4884a;
  --accent-dim: rgba(184, 115, 51, 0.15);
  --border: rgba(240, 236, 228, 0.08);
  --border-accent: rgba(184, 115, 51, 0.3);
  --error: #e05252;
  --success: #4caf50;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing scale (8px base) */
  --sp-1: 0.25rem;
  /* 4px  */
  --sp-2: 0.5rem;
  /* 8px  */
  --sp-3: 0.75rem;
  /* 12px */
  --sp-4: 1rem;
  /* 16px */
  --sp-5: 1.5rem;
  /* 24px */
  --sp-6: 2rem;
  /* 32px */
  --sp-7: 3rem;
  /* 48px */
  --sp-8: 4rem;
  /* 64px */
  --sp-9: 6rem;
  /* 96px */
  --sp-10: 8rem;
  /* 128px */

  /* Layout */
  --container-max: 72rem;
  /* 1152px */
  --container-pad: var(--sp-5);

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.3s;

  /* Focus ring */
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Star-field Dot Grid Background (subtle US motif) --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(240, 236, 228, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* --- Skip Navigation --- */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  background: var(--accent);
  color: var(--bg);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 0 0 4px 4px;
  font-weight: 500;
  font-size: 0.875rem;
  z-index: 9999;
  text-decoration: none;
  transition: top var(--duration) var(--ease);
}

.skip-nav:focus {
  top: 0;
}

/* --- Focus Styles --- */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}

h4 {
  font-size: 1.125rem;
}

p {
  color: var(--text-muted);
  max-width: 65ch;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

a:hover {
  color: var(--accent-hover);
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

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

.section {
  padding: var(--sp-9) 0;
}

.section+.section {
  border-top: 1px solid var(--border);
}

/* Pinstripe accent line */
.section-title {
  margin-bottom: var(--sp-6);
}

.section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--accent);
  margin-top: var(--sp-3);
}

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(17, 17, 17, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  height: 26px;
  transition: opacity 0.35s ease;
}

.hero-logo-visible .logo {
  opacity: 0;
  pointer-events: none;
}

.logo svg {
  height: 26px;
  width: auto;
  display: block;
  shape-rendering: geometricPrecision;
}

.logo:hover {
  opacity: 0.88;
}

.header-badge {
  font-size: 0.6875rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: var(--sp-1) var(--sp-3);
  border-radius: 100px;
  display: none;
}

@media (min-width: 768px) {
  .header-badge {
    display: inline-block;
  }
}

/* Desktop Nav */
.nav-list {
  display: none;
  list-style: none;
  gap: var(--sp-5);
  align-items: center;
}

@media (min-width: 768px) {
  .nav-list {
    display: flex;
  }
}

.nav-list a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
  position: relative;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--duration) var(--ease);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--text);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  transform: scaleX(1);
}

/* Mobile Hamburger */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 110;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: all var(--duration) var(--ease);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: all var(--duration) var(--ease);
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  bottom: -6px;
}

/* Hamburger animation when open */
.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(17, 17, 17, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration) var(--ease), visibility var(--duration) var(--ease);
}

.mobile-nav[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-list {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.mobile-nav-list a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.mobile-nav-list a:hover,
.mobile-nav-list a:focus-visible {
  color: var(--text);
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  padding-bottom: var(--sp-9);
  position: relative;
}

.hero-content {
  max-width: 52rem;
}

.hero-logo {
  margin-bottom: var(--sp-6);
}

.hero-logo svg {
  height: 72px;
  width: auto;
  display: block;
  shape-rendering: geometricPrecision;
}

@media (max-width: 767px) {
  .hero-logo svg {
    height: 48px;
  }
}

.hero h1 {
  margin-bottom: var(--sp-5);
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 48rem;
  margin-bottom: var(--sp-6);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.875rem 2rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration) var(--ease);
  min-height: 44px;
  min-width: 44px;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--accent);
}

.link-arrow {
  font-size: 0.9375rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
}

.link-arrow:hover {
  color: var(--accent);
}

.link-arrow::after {
  content: '→';
  transition: transform var(--duration) var(--ease);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* --- Philosophy --- */
.philosophy-grid {
  display: grid;
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}

.philosophy-item {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--text-muted);
  line-height: 1.75;
  padding-left: var(--sp-5);
  border-left: 1px solid var(--border);
  transition: border-color var(--duration) var(--ease);
}

.philosophy-item:hover {
  border-color: var(--accent);
}

/* --- Cards (Approach) --- */
.cards-grid {
  display: grid;
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--sp-6);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: var(--sp-3);
}

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

/* --- Focus Areas (Tiles) --- */
.tiles-grid {
  display: grid;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

@media (min-width: 768px) {
  .tiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tile {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color var(--duration) var(--ease);
}

.tile:hover {
  border-color: var(--border-accent);
}

.tile-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 0.625rem;
}

.tile p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* --- Trust Strip (flag left, content right) --- */
.trust-strip {
  padding: var(--sp-9) 0;
}

.trust-layout {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.trust-flag {
  flex-shrink: 0;
  width: 200px;
}

.trust-flag img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at center, black 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 70% at center, black 50%, transparent 100%);
}

.trust-content {
  flex: 1;
}

/* Mobile: stack vertically */
@media (max-width: 767px) {
  .trust-layout {
    flex-direction: column;
    text-align: center;
  }

  .trust-flag {
    width: 200px;
  }

  .trust-content p {
    text-align: center;
  }
}

.trust-strip h2 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  margin-bottom: var(--sp-4);
}

.trust-strip p {
  margin: 0 0 var(--sp-6);
}

.trust-icons {
  display: flex;
  justify-content: flex-start;
  gap: var(--sp-7);
  margin-top: var(--sp-5);
}

.trust-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.trust-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
}

.trust-icon span {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Contact / Form --- */
.form-intro {
  margin-bottom: var(--sp-6);
}

.form-intro p {
  margin-top: var(--sp-3);
}

.inquiry-form {
  max-width: 40rem;
}

.form-group {
  margin-bottom: var(--sp-5);
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--sp-2);
  letter-spacing: 0.02em;
}

.form-group .required-star {
  color: var(--accent);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  min-height: 44px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.form-input[aria-invalid="true"],
.form-select[aria-invalid="true"],
.form-textarea[aria-invalid="true"] {
  border-color: var(--error);
}

.form-textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239e9a93' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--error);
  margin-top: var(--sp-1);
  display: none;
}

.form-group.has-error .form-error {
  display: block;
}

/* Honeypot — hidden from view and screen readers */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

.form-status {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 4px;
  font-size: 0.875rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(76, 175, 80, 0.1);
  color: var(--success);
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.form-status.error {
  display: block;
  background: rgba(224, 82, 82, 0.1);
  color: var(--error);
  border: 1px solid rgba(224, 82, 82, 0.2);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-7) 0 var(--sp-6);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-company {
  font-size: 0.8125rem;
  line-height: 1.8;
  color: var(--text-dim);
}

.footer-company strong {
  color: var(--text-muted);
  font-weight: 500;
}

.footer-links {
  display: flex;
  gap: var(--sp-5);
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-dim);
  transition: color var(--duration) var(--ease);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

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

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: var(--sp-3);
}

/* --- Legal Pages (Privacy, Terms) --- */
.legal-page {
  padding-top: 6rem;
  min-height: 100vh;
}

.legal-page h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: var(--sp-2);
}

.legal-updated {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: var(--sp-7);
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: var(--sp-7);
  margin-bottom: var(--sp-3);
}

.legal-content p,
.legal-content li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: var(--sp-3);
}

.legal-content ul {
  list-style: disc;
  padding-left: var(--sp-5);
}

/* --- Thank-You Page --- */
.thankyou-page {
  padding-top: 6rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.thankyou-panel {
  max-width: 32rem;
  text-align: center;
  margin: 0 auto;
}

.thankyou-panel h1 {
  margin-bottom: var(--sp-4);
}

.thankyou-panel p {
  margin: 0 auto var(--sp-6);
  text-align: center;
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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