/* ============================================================
   Chozo Technologies - Global Stylesheet
   Clean, professional, mobile-first + dark mode
   ============================================================ */

:root {
  /* Brand palette */
  --brand-dark-blue: #232d33;
  --brand-light-blue: #17384c;
  --brand-orange: #ff972c;
  --brand-gray: #849696;
  --brand-off-white: #fefffb;

  /* Semantic (light theme defaults) */
  --color-bg: #fefffb;
  --color-bg-alt: #f4f7f7;
  --color-surface: #ffffff;
  --color-text: #232d33;
  --color-text-muted: #4a5a5a;
  --color-border: #e0e5e5;
  --color-header-bg: #232d33;
  --color-header-text: #fefffb;
  --color-hero-from: #232d33;
  --color-hero-to: #17384c;
  --color-icon-bg: #17384c;
  --color-icon-fg: #ff972c;
  --color-accent: #ff972c;
  --color-accent-hover: #ffa94d;
  --color-footer-bg: #232d33;
  --color-footer-text: rgba(254, 255, 251, 0.8);
  --color-footer-muted: rgba(254, 255, 251, 0.55);
  --color-shadow: 0 4px 24px rgba(35, 45, 51, 0.07);
  --color-shadow-hover: 0 10px 36px rgba(35, 45, 51, 0.12);

  --font-sans: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1100px;
  --radius: 10px;
  --transition: 0.25s ease;
}

/* Dark theme */
[data-theme="dark"] {
  --color-bg: #0f1418;
  --color-bg-alt: #161c22;
  --color-surface: #1a2229;
  --color-text: #e8ecec;
  --color-text-muted: #b0bcbc;
  --color-border: #2a343c;
  --color-header-bg: #0a0e11;
  --color-header-text: #fefffb;
  --color-hero-from: #0a0e11;
  --color-hero-to: #132430;
  --color-icon-bg: #1e3a4f;
  --color-icon-fg: #ff972c;
  --color-accent: #ff972c;
  --color-accent-hover: #ffa94d;
  --color-footer-bg: #0a0e11;
  --color-footer-text: rgba(254, 255, 251, 0.8);
  --color-footer-muted: rgba(254, 255, 251, 0.5);
  --color-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --color-shadow-hover: 0 10px 36px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-light-blue);
  text-decoration: none;
  transition: color var(--transition);
}

[data-theme="dark"] a {
  color: #7eb8d4;
}

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

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  margin-bottom: 0.85rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.35rem;
}

.section {
  padding: 4.5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 580px;
  margin: 0 auto;
  font-size: 1.08rem;
}

/* ========== HEADER ========== */
.site-header {
  background: var(--color-header-bg);
  color: var(--color-header-text);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

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

.logo-link {
  display: flex;
  align-items: center;
  color: var(--color-header-text);
  background: var(--brand-off-white);
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  transition: opacity var(--transition), box-shadow var(--transition);
}

.logo-link:hover {
  opacity: 0.95;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.logo-img {
  height: 42px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.nav a {
  color: var(--color-header-text);
  padding: 0.5rem 0.95rem;
  border-radius: 5px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a:focus {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-header-text);
  cursor: pointer;
  padding: 0.4rem;
  font-size: 1.55rem;
  line-height: 1;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-header-text);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-accent);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-icon--moon {
  display: none;
}

[data-theme="dark"] .theme-icon--sun {
  display: none;
}

[data-theme="dark"] .theme-icon--moon {
  display: block;
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(145deg, var(--color-hero-from) 0%, var(--color-hero-to) 100%);
  color: #fefffb;
  padding: 5.5rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(255, 151, 44, 0.14) 0%, transparent 55%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  color: #fefffb;
  margin-bottom: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero .tagline {
  font-size: clamp(1.05rem, 2.1vw, 1.22rem);
  color: rgba(254, 255, 251, 0.9);
  margin-bottom: 2.1rem;
  line-height: 1.55;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-accent);
  color: var(--brand-dark-blue);
  font-weight: 600;
  padding: 0.9rem 1.9rem;
  border-radius: 7px;
  font-size: 1.05rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 18px rgba(255, 151, 44, 0.38);
}

.hero-cta:hover {
  background: var(--color-accent-hover);
  color: var(--brand-dark-blue);
  transform: translateY(-2px);
  box-shadow: 0 7px 24px rgba(255, 151, 44, 0.48);
}

/* ========== SERVICES INTRO ========== */
.services-intro {
  padding-bottom: 2.5rem;
  background: var(--color-surface);
}

/* ========== SERVICE BLOCKS ========== */
.service-block {
  padding: 3.25rem 0;
  background: var(--color-surface);
}

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

.service-block-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.75rem 2.25rem;
  align-items: start;
  max-width: 820px;
  margin: 0 auto;
}

/* Alternate layout: icon on the right */
.service-block--reverse .service-block-inner {
  grid-template-columns: 1fr auto;
}

.service-block--reverse .service-block-icon {
  order: 2;
}

.service-block--reverse .service-block-content {
  order: 1;
  text-align: right;
}

.service-block-icon {
  width: 64px;
  height: 64px;
  background: var(--color-icon-bg);
  color: var(--color-icon-fg);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(23, 56, 76, 0.18);
}

.service-block-icon svg {
  width: 32px;
  height: 32px;
}

.service-block-content h3 {
  color: var(--color-text);
  margin-bottom: 0.55rem;
  font-size: 1.4rem;
}

.service-block-content p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* ========== ABOUT ========== */
.about {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.about-content {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.about-text h2 {
  text-align: left;
  margin-bottom: 1.15rem;
}

.about-text p {
  margin-bottom: 1.05rem;
}

.about-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.highlight {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: var(--color-shadow);
}

.highlight span {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.15rem;
}

.about-visual {
  display: flex;
  justify-content: center;
}

.about-logo {
  max-width: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.95;
}

/* ========== CONTACT ========== */
.contact {
  background: var(--color-surface);
}

.contact-grid {
  display: grid;
  gap: 2.75rem;
}

.contact-info h2 {
  text-align: left;
  margin-bottom: 0.85rem;
}

.contact-details {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item .icon {
  width: 42px;
  height: 42px;
  background: var(--color-icon-bg);
  color: var(--color-icon-fg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item .icon svg {
  width: 20px;
  height: 20px;
}

.contact-item strong {
  display: block;
  color: var(--color-text);
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.contact-item a,
.contact-item span {
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

.contact-form {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.9rem;
  box-shadow: var(--color-shadow);
}

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

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.97rem;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255, 151, 44, 0.22);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-submit {
  background: var(--color-accent);
  color: var(--brand-dark-blue);
  font-weight: 600;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 7px;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  transition: background var(--transition), transform var(--transition);
}

.form-submit:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.9rem;
  text-align: center;
}

.form-note a {
  font-weight: 500;
}

/* Web3Forms honeypot — must stay invisible */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-status {
  margin-top: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 7px;
  font-size: 0.92rem;
  text-align: center;
  font-weight: 500;
}

.form-status--success {
  background: rgba(40, 140, 80, 0.12);
  color: #1e6b3a;
  border: 1px solid rgba(40, 140, 80, 0.3);
}

[data-theme="dark"] .form-status--success {
  background: rgba(60, 180, 100, 0.15);
  color: #8fd9a8;
  border-color: rgba(60, 180, 100, 0.35);
}

.form-status--error {
  background: rgba(180, 50, 50, 0.1);
  color: #8b1e1e;
  border: 1px solid rgba(180, 50, 50, 0.28);
}

[data-theme="dark"] .form-status--error {
  background: rgba(220, 80, 80, 0.15);
  color: #f0a0a0;
  border-color: rgba(220, 80, 80, 0.35);
}

.form-submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 2.75rem 0 1.75rem;
  text-align: center;
}

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

.footer-logo {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  background: var(--brand-off-white);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.35rem;
  margin: 0.35rem 0;
}

.footer-links a {
  color: var(--color-footer-text);
  font-size: 0.92rem;
  opacity: 0.9;
}

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

.copyright {
  font-size: 0.85rem;
  color: var(--color-footer-muted);
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 700px) {
  .about-content {
    grid-template-columns: 1.25fr 0.85fr;
  }

  .contact-grid {
    grid-template-columns: 1fr 1.05fr;
    align-items: start;
  }

  .service-block-inner {
    gap: 2rem 2.75rem;
  }
}

@media (max-width: 700px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-header-bg);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  }

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

  .nav a {
    padding: 0.8rem 1rem;
    width: 100%;
    text-align: left;
  }

  .header-inner {
    position: relative;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .hero {
    padding: 3.75rem 0 3.5rem;
  }

  .section {
    padding: 3.25rem 0;
  }

  .service-block {
    padding: 2.5rem 0;
  }

  .service-block-inner {
    grid-template-columns: 1fr;
    gap: 1.15rem;
    text-align: left;
  }

  /* Keep icon on top / left-aligned on mobile even for reversed blocks */
  .service-block--reverse .service-block-inner {
    grid-template-columns: 1fr;
  }

  .service-block--reverse .service-block-icon {
    order: 0;
  }

  .service-block--reverse .service-block-content {
    order: 0;
    text-align: left;
  }

  .service-block-icon {
    width: 56px;
    height: 56px;
  }

  .service-block-icon svg {
    width: 28px;
    height: 28px;
  }
}

/* Accessibility */
.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;
}

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

@media print {
  .site-header,
  .hero-cta,
  .contact-form,
  .menu-toggle,
  .theme-toggle {
    display: none;
  }
  body {
    background: white;
    color: black;
  }
}
