/*
Theme Name: Stallwright EV Partners
Theme URI: https://stallwright.com
Author: Stallwright EV Partners
Description: Custom theme for Stallwright EV Partners. Black and hot pink editorial design with built-in inquiry forms.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: stallwright
*/

/* ==========================================================
   1. TOKENS (site-wide)
   ========================================================== */
:root {
  --sw-ink: #0B0B0C;
  --sw-panel: #141414;
  --sw-text: #F5F5F5;
  --sw-text-2: #D4D4D8;
  --sw-muted: #A1A1AA;
  --sw-line: #27272A;
  --sw-rule: #3F3F46;
  --sw-field-border: #52525B;
  --sw-accent: #FF2E93; /* overridden by Customizer */
  --sw-serif: 'Instrument Serif', Georgia, serif;
  --sw-sans: 'Geist', 'Helvetica Neue', Helvetica, sans-serif;
  --sw-mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --sw-gutter: clamp(20px, 5vw, 64px);
  --sw-section: clamp(72px, 9vw, 128px);
}

/* ==========================================================
   2. BASE (site-wide)
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sw-ink);
  color: var(--sw-text);
  font-family: var(--sw-sans);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sw-text); }
a:hover { color: var(--sw-accent); }
:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 3px; }
.sw-skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--sw-accent); color: var(--sw-ink); padding: 12px 18px; text-decoration: none;
}
.sw-skip:focus { top: 12px; }
.sw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sw-wrap { max-width: 1312px; margin: 0 auto; padding-left: var(--sw-gutter); padding-right: var(--sw-gutter); }
.sw-section { padding-top: var(--sw-section); padding-bottom: var(--sw-section); }
.sw-panel { background: var(--sw-panel); }
.sw-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(40px, 6vw, 96px);
}
.sw-split--end { align-items: end; }
.sw-split--center { align-items: center; }
.sw-stack { display: flex; flex-direction: column; gap: 24px; }

/* Type */
.sw-eyebrow {
  margin: 0; font-family: var(--sw-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--sw-accent);
}
.sw-eyebrow--plain { color: var(--sw-text); }
.sw-h1 {
  margin: 0; font-family: var(--sw-serif); font-weight: 400;
  font-size: clamp(44px, 6.5vw, 96px); line-height: 1; letter-spacing: -0.01em;
}
.sw-h2 {
  margin: 0; font-family: var(--sw-serif); font-weight: 400;
  font-size: clamp(36px, 4.5vw, 60px); line-height: 1.05;
}
.sw-h3 { margin: 0; font-family: var(--sw-serif); font-weight: 400; font-size: 34px; line-height: 1.1; }
.sw-accent { color: var(--sw-accent); }
.sw-lede { margin: 0; font-size: 19px; color: var(--sw-muted); max-width: 560px; }
.sw-body { margin: 0; color: var(--sw-text-2); }
.sw-quiet { color: var(--sw-muted); }
.sw-mono { font-family: var(--sw-mono); font-size: 13px; }

/* Buttons */
.sw-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 14px 26px;
  font: inherit; font-weight: 500; font-size: 16px; text-decoration: none;
  background: var(--sw-accent); color: var(--sw-ink); border: 1px solid var(--sw-accent);
  cursor: pointer;
}
.sw-btn:hover { color: var(--sw-ink); filter: brightness(1.08); }
.sw-btn--ghost { background: transparent; color: var(--sw-text); border-color: var(--sw-field-border); }
.sw-btn--ghost:hover { color: var(--sw-text); border-color: var(--sw-text); filter: none; }
.sw-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================
   3. HEADER + FOOTER (site-wide)
   ========================================================== */
.sw-header { border-bottom: 1px solid var(--sw-line); }
.sw-header .sw-wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 20px; padding-bottom: 20px;
}
.sw-brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--sw-text); min-height: 44px; padding-top: 4px; }
.sw-brand:hover { color: var(--sw-text); }
.sw-brand__name { font-family: var(--sw-serif); font-size: 32px; line-height: 1; }
.sw-brand__tag { font-family: var(--sw-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--sw-accent); }
.sw-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 15px; }
.sw-nav a { color: var(--sw-text); text-decoration: none; padding: 12px 14px; }
.sw-nav a[aria-current="page"] { color: var(--sw-accent); }
.sw-nav .sw-nav__cta {
  background: var(--sw-accent); color: var(--sw-ink); font-weight: 500; padding: 12px 20px;
  transform: translateX(8px); /* transform, not margin, keeps the flex anchor stable */
}
.sw-nav .sw-nav__cta:hover { color: var(--sw-ink); }
.sw-nav .sw-nav__cta[aria-current="page"] { color: var(--sw-ink); }

.sw-cta-band .sw-wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 40px;
}
.sw-cta-band__title {
  margin: 0; font-family: var(--sw-serif); font-weight: 400;
  font-size: clamp(40px, 5.5vw, 80px); line-height: 1; max-width: 760px;
}

.sw-footer { border-top: 1px solid var(--sw-line); font-size: 14px; color: var(--sw-muted); }
.sw-footer .sw-wrap { display: flex; flex-direction: column; gap: 28px; padding-top: 48px; padding-bottom: 48px; }
.sw-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.sw-footer__brand { font-family: var(--sw-serif); font-size: 26px; color: var(--sw-text); }
.sw-footer__brand span { font-family: var(--sw-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--sw-accent); }
.sw-footer nav { display: flex; flex-wrap: wrap; gap: 4px; }
.sw-footer nav a { color: var(--sw-text); text-decoration: none; padding: 12px; }
.sw-footer p { margin: 0; }
.sw-footer__legal { font-size: 12px; line-height: 1.6; max-width: 900px; }

/* ==========================================================
   4. SHARED COMPONENTS
   ========================================================== */
.sw-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1px; background: var(--sw-line); border: 1px solid var(--sw-line);
}
.sw-tile { background: var(--sw-ink); padding: 40px 32px; display: flex; flex-direction: column; gap: 16px; min-height: 320px; text-decoration: none; color: var(--sw-text); }
a.sw-tile:hover { color: var(--sw-text); background: var(--sw-panel); }
.sw-tile__label { font-family: var(--sw-mono); font-size: 12px; letter-spacing: 0.14em; }
.sw-tile__link { margin-top: auto; font-weight: 500; }

.sw-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); column-gap: 48px; row-gap: 8px; }
.sw-steps li { border-top: 1px solid var(--sw-rule); padding: 24px 0 32px; display: flex; flex-direction: column; gap: 10px; }
.sw-steps__title { font-size: 22px; font-weight: 500; }

.sw-rules { list-style: none; margin: 0; padding: 0; }
.sw-rules li { border-top: 1px solid var(--sw-rule); padding: 18px 0; display: flex; gap: 20px; }
.sw-rules li:last-child { border-bottom: 1px solid var(--sw-rule); }
.sw-rules .sw-mono { padding-top: 3px; }

.sw-photo { border: 1px solid var(--sw-line); background: var(--sw-panel); display: flex; align-items: flex-end; padding: 24px; overflow: hidden; position: relative; }
.sw-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sw-photo__label { font-family: var(--sw-mono); font-size: 12px; letter-spacing: 0.12em; color: #8A8A93; position: relative; }

/* Forms */
.sw-form { display: flex; flex-direction: column; gap: 20px; }
.sw-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.sw-field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
.sw-field input, .sw-field select, .sw-field textarea {
  font: inherit; font-weight: 400; font-size: 17px; padding: 14px 16px;
  border: 1px solid var(--sw-field-border); background: var(--sw-panel); color: var(--sw-text);
  border-radius: 0; width: 100%;
}
.sw-field textarea { resize: vertical; min-height: 140px; }
.sw-check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--sw-text-2); }
.sw-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--sw-accent); flex: none; }
.sw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sw-notice { padding: 16px 20px; border: 1px solid var(--sw-accent); color: var(--sw-text); }
.sw-notice--error { border-color: #F87171; }

/* ==========================================================
   5. PAGE-SPECIFIC (scoped by body class)
   ========================================================== */

/* Home */
.sw-page-home .sw-hero { padding-top: clamp(64px, 10vw, 140px); padding-bottom: clamp(64px, 8vw, 120px); }
.sw-page-home .sw-hero .sw-h1 { font-size: clamp(48px, 7vw, 104px); line-height: 0.98; }
.sw-page-home .sw-hero-photo { height: clamp(260px, 36vw, 520px); }
.sw-page-home .sw-founder-photo { aspect-ratio: 4 / 5; }
.sw-page-home .sw-founder-name { margin: 0; font-family: var(--sw-serif); font-size: 26px; }
.sw-page-home .sw-founder-name span { font-family: var(--sw-sans); font-size: 15px; color: var(--sw-muted); }
.sw-page-home .sw-intro-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 56px; }
.sw-page-home .sw-closing { margin: 0; font-family: var(--sw-serif); font-size: 28px; line-height: 1.25; color: var(--sw-text); }

/* Advisory */
.sw-page-advisory .sw-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.sw-page-advisory .sw-tier { border: 1px solid var(--sw-line); padding: 36px 32px; display: flex; flex-direction: column; gap: 20px; }
.sw-page-advisory .sw-tier--featured { border-color: var(--sw-accent); background: var(--sw-panel); }
.sw-page-advisory .sw-tier h3 { margin: 0; font-family: var(--sw-serif); font-weight: 400; font-size: 36px; line-height: 1.1; }
.sw-page-advisory .sw-tier ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--sw-text-2); }
.sw-page-advisory .sw-price { margin: auto 0 0; padding-top: 20px; border-top: 1px solid var(--sw-line); font-family: var(--sw-serif); font-size: 30px; }
.sw-page-advisory .sw-price small { font-family: var(--sw-sans); font-size: 14px; color: var(--sw-muted); }
.sw-page-advisory .sw-price__note { display: block; margin-top: 6px; font-family: var(--sw-sans); font-size: 14px; color: var(--sw-text-2); }
.sw-page-advisory .sw-faq details { border-top: 1px solid var(--sw-rule); padding: 20px 0; }
.sw-page-advisory .sw-faq details:last-child { border-bottom: 1px solid var(--sw-rule); }
.sw-page-advisory .sw-faq summary { cursor: pointer; font-size: 20px; font-weight: 500; min-height: 44px; }
.sw-page-advisory .sw-faq p { margin: 12px 0 0; color: var(--sw-text-2); }

/* Investors */
.sw-page-investors .sw-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 40px; }
.sw-page-investors .sw-flow > div { display: flex; flex-direction: column; gap: 12px; border-top: 2px solid var(--sw-accent); padding-top: 24px; }
.sw-page-investors .sw-terms { margin: 0; }
.sw-page-investors .sw-terms div { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--sw-rule); padding: 16px 0; }
.sw-page-investors .sw-terms div:last-child { border-bottom: 1px solid var(--sw-rule); }
.sw-page-investors .sw-terms dt { font-weight: 500; }
.sw-page-investors .sw-terms dd { margin: 0; color: var(--sw-text-2); text-align: right; }
.sw-page-investors .sw-risks { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; color: var(--sw-text-2); }

/* Contact */
.sw-page-contact .sw-details { margin: 0; }
.sw-page-contact .sw-details div { border-top: 1px solid var(--sw-rule); padding: 18px 0; display: flex; flex-direction: column; gap: 4px; }
.sw-page-contact .sw-details div:last-child { border-bottom: 1px solid var(--sw-rule); }
.sw-page-contact .sw-details dt { font-family: var(--sw-mono); font-size: 12px; letter-spacing: 0.14em; }
.sw-page-contact .sw-details dd { margin: 0; font-size: 20px; }
.sw-page-contact .sw-roles { border: 0; margin: 0; padding: 0; }
.sw-page-contact .sw-roles legend { font-size: 14px; font-weight: 500; margin-bottom: 12px; padding: 0; }
.sw-page-contact .sw-roles__set { display: flex; flex-wrap: wrap; gap: 10px; }
.sw-page-contact .sw-role input { position: absolute; opacity: 0; pointer-events: none; }
.sw-page-contact .sw-role span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px;
  border: 1px solid var(--sw-accent); color: var(--sw-text); cursor: pointer; font-size: 15px;
}
.sw-page-contact .sw-role input:checked + span { background: var(--sw-accent); color: var(--sw-ink); }
.sw-page-contact .sw-role input:focus-visible + span { outline: 2px solid var(--sw-text); outline-offset: 3px; }

/* Generic pages (privacy policy etc.) */
.sw-page-generic .sw-content { max-width: 760px; }
.sw-page-generic .sw-content p, .sw-page-generic .sw-content li { color: var(--sw-text-2); }

/* ==========================================================
   6. MEDIA (media rules only)
   ========================================================== */
@media (max-width: 600px) {
  .sw-nav .sw-nav__cta { transform: none; }
  .sw-page-investors .sw-terms div { flex-direction: column; gap: 4px; }
  .sw-page-investors .sw-terms dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
