/* ==========================================================================
   Martinez Marketing — styles
   Edit colors, spacing, and type in the :root tokens below.
   ========================================================================== */

:root {
  /* Brand colors */
  --bg: #09070D;
  --bg-alt: #110D19;
  --card: #191222;
  --purple: #8B5CF6;
  --lavender: #C4B5FD;
  --text: #F5F2FA;
  --text-2: #B8B0C5;

  /* Derived */
  --line: rgba(196, 181, 253, 0.14);
  --line-strong: rgba(196, 181, 253, 0.28);
  --btn-text: #09070D;          /* dark text on lavender = 10.9:1 contrast */
  --btn-hover: #DDD3FE;

  /* Type */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --max: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 10vw, 8rem);
  --header-h: 72px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --ease: 180ms ease;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; }

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

ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.honeypot { display: none !important; }

.skip-link {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--lavender);
  color: var(--btn-text);
  font-weight: 700;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--lavender); background: rgba(139, 92, 246, 0.1); }

.btn-small { min-height: 44px; padding: 0.55rem 1.1rem; font-size: 0.95rem; }
.btn-large { min-height: 54px; padding: 0.9rem 2rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 7, 13, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  min-height: 44px;
}

.wordmark-mark {
  display: block;
  width: auto; height: 36px;
  flex-shrink: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.nav-list a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.975rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--ease);
}
.nav-list a:not(.btn):hover { color: var(--text); }
.nav-list .btn { margin-left: 0.5rem; }

/* Mobile menu toggle (only shown when JS is running) */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0 0.9rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 16px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1060px) {
  /* Without JS the nav simply wraps below the wordmark and stays usable. */
  .site-nav { width: 100%; padding-bottom: 0.75rem; }
  .nav-list .btn { margin-left: 0; }

  .header-inner { column-gap: 0.75rem; }
  .wordmark { font-size: 1rem; gap: 0.55rem; }
  .wordmark-mark { height: 30px; }
  .js .nav-toggle { display: inline-flex; padding: 0 0.8rem; }
  .js .site-nav { display: none; padding-bottom: 1.25rem; }
  .js .site-nav.is-open { display: block; }
  .js .nav-list { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .js .nav-list a:not(.btn) {
    min-height: 48px;
    padding: 0 0.25rem;
    font-size: 1.1rem;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .js .nav-list .btn { margin-top: 0.75rem; width: 100%; min-height: 50px; }
}

@media (max-width: 400px) {
  /* Keep wordmark + menu button on one row on small phones */
  .header-inner { column-gap: 0.5rem; }
  .wordmark { font-size: 0.95rem; gap: 0.5rem; }
  .js .nav-toggle { padding: 0 0.85rem; gap: 0; }
  .js .nav-toggle-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(4.5rem, 12vw, 9rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto 35%;
  height: 120%;
  z-index: -1;
  background:
    radial-gradient(closest-side, rgba(139, 92, 246, 0.26), rgba(139, 92, 246, 0) 70%);
  pointer-events: none;
}

.eyebrow {
  color: var(--lavender);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  max-width: 14ch;
  font-size: clamp(2.75rem, 8.2vw, 6.25rem);
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-lede {
  max-width: 38rem;
  margin-top: 1.75rem;
  color: var(--text-2);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

/* Service index strip: real prices, links down to each service */
.hero-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(3.5rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
}

.hero-index li + li { border-left: 1px solid var(--line); }

.hero-index a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  height: 100%;
  padding: 1.4rem 1.5rem 0.5rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--ease), background-color var(--ease);
}
.hero-index li:first-child a { padding-left: 0; }
.hero-index a:hover { color: var(--text); }
.hero-index-name { font-size: 0.95rem; }
.hero-index-price { color: var(--text); font-size: 1.35rem; font-weight: 650; letter-spacing: -0.01em; }
.hero-index-note { color: var(--text-2); font-size: 0.9rem; font-weight: 500; letter-spacing: 0; }

.hero-assurance {
  margin-top: 1.1rem;
  color: var(--text-2);
  font-size: 0.975rem;
}

@media (max-width: 640px) {
  .hero-index { grid-template-columns: 1fr; }
  .hero-index li + li { border-left: 0; border-top: 1px solid var(--line); }
  .hero-index a { flex-direction: row; justify-content: space-between; align-items: baseline; padding: 1rem 0; }
  .hero-index-price { font-size: 1.1rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero::before { inset: -15% -60% auto 10%; height: 70%; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head h2,
.about-copy h2,
.start-intro h2 {
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  font-weight: 720;
  letter-spacing: -0.035em;
}
.section-head p {
  margin-top: 1.25rem;
  color: var(--text-2);
  font-size: 1.15rem;
}

/* ---------- How It Works ---------- */
.section-divided { border-top: 1px solid var(--line); }

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
}
.step-number {
  display: block;
  margin-bottom: 1rem;
  color: var(--lavender);
  font-size: 0.95rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: clamp(1.2rem, 1.8vw, 1.35rem); font-weight: 680; }
.step p { margin-top: 0.75rem; color: var(--text-2); font-size: 1rem; line-height: 1.6; }

.steps-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.steps-footer p { flex: 1 1 20rem; color: var(--text); font-size: 1.05rem; }

@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .steps-footer .btn { width: 100%; }
}

/* ---------- Services ---------- */
.services { display: grid; gap: 1.25rem; }

.service {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--ease);
}
.service:hover { border-color: var(--line-strong); }

.service-featured {
  border-color: rgba(139, 92, 246, 0.45);
  background:
    linear-gradient(160deg, rgba(139, 92, 246, 0.14), rgba(139, 92, 246, 0) 45%),
    var(--card);
}
.service-featured:hover { border-color: rgba(139, 92, 246, 0.7); }

.service-main { display: flex; flex-direction: column; align-items: flex-start; }
.service-main h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 700; }

.service-price {
  margin-top: 1.25rem;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}
.service-price-label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
}
.service-price-prefix {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--lavender);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
}
.service-price-unit { color: var(--text-2); font-size: 1.1rem; font-weight: 500; letter-spacing: 0; }

.service-desc { margin-top: 1rem; color: var(--text); font-size: 1.1rem; }
.service-cta-note { margin-top: 0.9rem; color: var(--text-2); font-size: 0.925rem; line-height: 1.55; }
.service-scope { margin-top: 1.25rem; color: var(--text-2); font-size: 0.95rem; }
.service-fit {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.98rem;
}
.service-fit strong { color: var(--text); font-weight: 600; }
.service-main .btn { margin-top: 1.75rem; }

.service-detail h4 {
  margin-bottom: 1rem;
  color: var(--lavender);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
}

.check-list { display: grid; gap: 0.7rem; }
.check-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.45em;
  width: 0.7rem; height: 0.4rem;
  border-left: 2px solid var(--purple);
  border-bottom: 2px solid var(--purple);
  transform: rotate(-45deg);
}

.note {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding: 1.1rem 1.25rem;
  background: rgba(9, 7, 13, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.6;
}
.note strong { color: var(--text); font-weight: 600; }

@media (max-width: 900px) {
  .service { grid-template-columns: 1fr; }
}

/* ---------- Portfolio ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.project {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease);
}
.project:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.project-media {
  aspect-ratio: 4 / 3;
  background: #0E0B14;
  border-bottom: 1px solid var(--line);
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1.4rem;
}
.project-body h3 { font-size: 1.3rem; font-weight: 680; }
.project-category { margin-top: 0.3rem; color: var(--text-2); font-size: 0.975rem; }

.tag {
  flex-shrink: 0;
  padding: 0.3rem 0.7rem;
  color: var(--lavender);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(196, 181, 253, 0.35);
  border-radius: 999px;
}

@media (max-width: 720px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: end;
}
.about-copy p {
  max-width: 40rem;
  margin-top: 1.25rem;
  color: var(--text-2);
  font-size: 1.125rem;
}
.about-copy h2 + p { margin-top: 1.75rem; }

.principles { border-top: 1px solid var(--line-strong); }
.principles li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.principles li::before {
  content: "";
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--purple);
}

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
}

/* ---------- Free Demo form ---------- */
.start {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.start-intro { position: sticky; top: calc(var(--header-h) + 2rem); }
.start-intro p { margin-top: 1.5rem; color: var(--text-2); font-size: 1.125rem; }

.inquiry-form {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.form-hint { margin-bottom: 1.5rem; color: var(--text-2); font-size: 0.925rem; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field-full { grid-column: 1 / -1; }

.field label { font-size: 0.975rem; font-weight: 600; color: var(--text); }
.req { color: var(--lavender); }
.field-help { color: var(--text-2); font-size: 0.9rem; line-height: 1.5; }
.start-intro .demo-terms { margin-top: 2rem; font-size: 0.975rem; }
.start-intro .demo-terms p { margin-top: 0; font-size: inherit; }
.start-intro h2 { font-size: clamp(2rem, 3.6vw, 3rem); }

.optional { color: var(--text-2); font-weight: 400; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 0.9rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;   /* 16px prevents iOS zoom on focus */
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field ::placeholder { color: #857C94; opacity: 1; }

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  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 1.5l5 5 5-5' fill='none' stroke='%23C4B5FD' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  cursor: pointer;
}
.field select option { background: var(--card); color: var(--text); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(196, 181, 253, 0.45); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35);
}

/* Only flag invalid fields after the visitor has interacted with them */
.field input:user-invalid,
.field select:user-invalid { border-color: #F28BA8; }

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.form-footer p { flex: 1 1 14rem; color: var(--text-2); font-size: 0.975rem; }

@media (max-width: 960px) {
  .start { grid-template-columns: 1fr; }
  .start-intro { position: static; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-footer .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 3rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem 2.5rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.footer-logo { display: block; width: auto; height: 44px; flex-shrink: 0; }
.footer-name { font-weight: 700; font-size: 1.1rem; }
.footer-tag { color: var(--text-2); font-size: 0.925rem; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-nav a:hover { color: var(--text); }

.copyright { color: var(--text-2); font-size: 0.875rem; }

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; margin-left: -0.6rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .btn-primary:hover,
  .project:hover { transform: none; }
}
