/* Runtrol - Clean, Accessible, Senior-Friendly Stylesheet (WCAG AA) */
:root {
  --color-primary: #1e3a8a;       /* Deep reassuring blue */
  --color-primary-hover: #172554;
  --color-accent: #d97706;        /* Warm gold accent */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1e293b;          /* Dark slate for high contrast */
  --color-text-muted: #475569;
  --color-border: #cbd5e1;
  --color-error: #b91c1c;
  --color-success: #15803d;
  --font-stack: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

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

html {
  font-size: 17px; /* Enhanced readability for 45+ demographic */
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-stack);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover, a:focus-visible {
  color: var(--color-primary-hover);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.max-w-text {
  max-width: 780px;
}

.max-w-form {
  max-width: 640px;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

/* Header & Nav */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
  background-color: #e0e7ff;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 4.5rem 0;
}

.hero-content {
  max-width: 820px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.hero-section h1 {
  font-size: 2.2rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero-lead {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #cbd5e1;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  min-height: 48px; /* Touch target accessibility */
}

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

.btn-primary:hover, .btn-primary:focus-visible {
  background-color: #b45309;
  color: #ffffff;
}

.btn-secondary {
  background-color: transparent;
  border-color: #ffffff;
  color: #ffffff;
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  background-color: #ffffff;
  color: #0f172a;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  min-height: 38px;
}

/* Sections */
.features-section,
.workflow-section,
.operator-note-section,
.form-section,
.faq-section,
.page-content {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 1.85rem;
  margin-bottom: 2.5rem;
  color: var(--color-primary);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

/* Workflow Steps */
.workflow-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.workflow-steps li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.75rem;
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: 50%;
  font-weight: 700;
  margin-bottom: 1rem;
}

.workflow-steps h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* Operator Note */
.operator-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 2rem;
  max-width: 820px;
  margin: 0 auto;
}

.operator-box h3 {
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

/* Forms */
.form-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.form-intro {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--color-text-muted);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.required {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background-color: #ffffff;
  color: var(--color-text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  outline: 2px solid var(--color-primary);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  cursor: pointer;
}

.checkbox-group label {
  font-weight: normal;
  font-size: 0.95rem;
}

.error-msg {
  display: none;
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 0.35rem;
  font-weight: 600;
}

.form-status {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  display: none;
  font-weight: 600;
}

.form-status.error {
  display: block;
  background-color: #fef2f2;
  border: 1px solid #f87171;
  color: var(--color-error);
}

.form-status.success {
  display: block;
  background-color: #f0fdf4;
  border: 1px solid #86efac;
  color: var(--color-success);
}

/* FAQ */
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.faq-item h3 {
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

/* Tables & Specifications */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--color-surface);
}

.spec-table th,
.spec-table td {
  padding: 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

.spec-table th {
  background-color: #f1f5f9;
  width: 30%;
  font-weight: 700;
}

/* Service Plan Cards */
.plan-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.plan-card:hover {
  border-color: var(--color-primary);
}

.plan-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--color-accent);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

.plan-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0.5rem 0 1rem;
}

.plan-features {
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-top: 1rem;
}

.plan-features li {
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 3.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.footer-meta {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-meta a {
  color: #93c5fd;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a,
.link-button {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links a:hover,
.link-button:hover {
  color: #ffffff;
  text-decoration: underline;
}

.link-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-align: left;
}

.copyright {
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Thank You Box */
.thank-you-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 3rem 2rem;
  margin: 2rem auto;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background-color: #dcfce7;
  color: var(--color-success);
  border-radius: 50%;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.direct-notice {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  padding: 1rem;
  border-radius: 6px;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1e293b;
  color: #ffffff;
  padding: 1.25rem 0;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  display: none;
}

.cookie-banner.active {
  display: block;
}

.cookie-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.cookie-text {
  max-width: 750px;
}

.cookie-text h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cookie-text p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.cookie-text a {
  color: #93c5fd;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }
  .main-nav ul {
    justify-content: center;
    gap: 0.5rem;
  }
  .hero-section h1 {
    font-size: 1.65rem;
  }
  .footer-content {
    flex-direction: column;
  }
  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .cookie-actions {
    width: 100%;
    justify-content: flex-end;
  }
}