/* ==========================================================================
   addons-web.css — Page-specific styles for /addons/web
   Scope: everything under .aw-page
   Rev. 3 design tokens, all custom properties inherited from kairikos-parent-style.
   ========================================================================== */

.aw-page {
  --aw-radius: var(--kairikos-radius-xl, 16px);
  --aw-radius-lg: var(--kairikos-radius-lg, 12px);
  --aw-radius-2xl: var(--kairikos-radius-2xl, 24px);
  --aw-ease: var(--kairikos-ease, cubic-bezier(0.4, 0, 0.2, 1));
  --aw-dur-fast: var(--kairikos-duration-fast, 150ms);
  --aw-dur-normal: var(--kairikos-duration-normal, 250ms);
  --aw-border: var(--kairikos-border, rgba(20, 24, 31, 0.08));
  --aw-shadow-sm: var(--kairikos-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.04));
  --aw-shadow-md: var(--kairikos-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.06));

  background: var(--kairikos-hueso, #faf6ee);
  color: var(--kairikos-tinta, #14181f);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.aw-page .container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .aw-page .container { padding: 0 20px; }
}

/* ================== Section header (shared) ================== */

.aw-section-header {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.aw-section-label {
  display: inline-block;
  font-family: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kairikos-terracota, #be4f33);
  margin-bottom: 12px;
}

.aw-section-title {
  font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--kairikos-tinta, #14181f);
  margin: 0 0 16px;
}

.aw-section-sub {
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(20, 24, 31, 0.7);
  margin: 0;
}

@media (max-width: 768px) {
  .aw-section-header { margin-bottom: 32px; }
  .aw-section-sub { font-size: 1rem; }
}

/* ================== S1 HERO ================== */

.aw-hero {
  padding: 80px 0 56px;
  background:
    radial-gradient(circle at 20% 0%, rgba(190, 79, 51, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 30%, rgba(218, 165, 32, 0.05) 0%, transparent 50%),
    var(--kairikos-hueso, #faf6ee);
}

.aw-hero__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.aw-hero__eyebrow {
  display: inline-block;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kairikos-terracota, #be4f33);
  background: rgba(190, 79, 51, 0.08);
  border: 1px solid rgba(190, 79, 51, 0.18);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 24px;
}

.aw-hero__title {
  font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--kairikos-tinta, #14181f);
  margin: 0 0 20px;
}

.aw-hero__sub {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.55;
  color: rgba(20, 24, 31, 0.72);
  margin: 0 auto 32px;
  max-width: 640px;
}

.aw-hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.aw-hero__cta {
  min-height: 48px;
  padding: 0 28px;
}

.aw-hero__secondary {
  min-height: 48px;
  padding: 0 24px;
}

.aw-hero__trust {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
  font-size: 0.9rem;
  color: rgba(20, 24, 31, 0.6);
}

.aw-hero__trust li {
  position: relative;
  padding-left: 22px;
}

.aw-hero__trust li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--kairikos-terracota, #be4f33);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center / contain;
}

@media (max-width: 768px) {
  .aw-hero { padding: 56px 0 40px; }
  .aw-hero__actions { flex-direction: column; align-items: stretch; }
  .aw-hero__cta,
  .aw-hero__secondary { width: 100%; }
  .aw-hero__trust { font-size: 0.85rem; gap: 8px 16px; }
}

/* ================== S2 FEATURES ================== */

.aw-features {
  padding: 80px 0;
  background: var(--kairikos-hueso, #faf6ee);
}

.aw-features__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.aw-feature {
  background: var(--kairikos-hueso, #faf6ee);
  border: 1px solid var(--aw-border);
  border-radius: var(--aw-radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--aw-dur-normal) var(--aw-ease),
              box-shadow var(--aw-dur-normal) var(--aw-ease);
}

.aw-feature:hover {
  border-color: var(--kairikos-terracota, #be4f33);
  box-shadow: var(--aw-shadow-sm);
}

.aw-feature__icon {
  width: 48px;
  height: 48px;
  background: rgba(190, 79, 51, 0.08);
  color: var(--kairikos-terracota, #be4f33);
  border-radius: var(--aw-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.aw-feature__title {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.3;
  margin: 0;
  color: var(--kairikos-tinta, #14181f);
}

.aw-feature__body {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(20, 24, 31, 0.7);
  margin: 0;
}

.aw-feature__body code {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.85em;
  background: rgba(20, 24, 31, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--kairikos-tinta, #14181f);
}

@media (max-width: 900px) {
  .aw-features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .aw-features { padding: 56px 0; }
  .aw-features__grid { grid-template-columns: 1fr; }
}

/* ================== S3 HOW IT WORKS ================== */

.aw-how {
  padding: 80px 0;
  background: var(--kairikos-tinta, #14181f);
  color: var(--kairikos-hueso, #faf6ee);
}

.aw-how .aw-section-title { color: var(--kairikos-hueso, #faf6ee); }
.aw-how .aw-section-sub { color: rgba(250, 246, 238, 0.7); }

.aw-how__steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  counter-reset: awstep;
}

.aw-how__step {
  position: relative;
  padding: 28px 24px;
  background: rgba(250, 246, 238, 0.04);
  border: 1px solid rgba(250, 246, 238, 0.08);
  border-radius: var(--aw-radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aw-how__num {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--kairikos-terracota, #be4f33);
  font-weight: 400;
}

.aw-how__title {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0;
  color: var(--kairikos-hueso, #faf6ee);
}

.aw-how__body {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(250, 246, 238, 0.7);
  margin: 0;
}

@media (max-width: 900px) {
  .aw-how__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .aw-how { padding: 56px 0; }
  .aw-how__steps { grid-template-columns: 1fr; }
}

/* ================== S4 FAQ ================== */

.aw-faq {
  padding: 80px 0;
  background: var(--kairikos-hueso, #faf6ee);
}

.aw-faq__list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aw-faq__item {
  background: var(--kairikos-hueso, #faf6ee);
  border: 1px solid var(--aw-border);
  border-radius: var(--aw-radius);
  overflow: hidden;
  transition: border-color var(--aw-dur-normal) var(--aw-ease);
}

.aw-faq__item:hover {
  border-color: rgba(190, 79, 51, 0.3);
}

.aw-faq__trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 24px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--kairikos-tinta, #14181f);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  transition: color var(--aw-dur-fast) var(--aw-ease);
}

.aw-faq__trigger:hover,
.aw-faq__trigger:focus-visible {
  color: var(--kairikos-terracota, #be4f33);
}

.aw-faq__trigger:focus-visible {
  outline: 2px solid var(--kairikos-terracota, #be4f33);
  outline-offset: -2px;
  border-radius: var(--aw-radius-lg);
}

.aw-faq__chev {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(20, 24, 31, 0.04);
  color: var(--kairikos-tinta, #14181f);
  transition: transform var(--aw-dur-normal) var(--aw-ease),
              background var(--aw-dur-normal) var(--aw-ease),
              color var(--aw-dur-normal) var(--aw-ease);
}

.aw-faq__trigger[aria-expanded="true"] .aw-faq__chev {
  transform: rotate(180deg);
  background: var(--kairikos-terracota, #be4f33);
  color: var(--kairikos-hueso, #faf6ee);
}

.aw-faq__panel {
  padding: 0 24px 24px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(20, 24, 31, 0.78);
}

.aw-faq__panel p { margin: 0; }

@media (max-width: 600px) {
  .aw-faq { padding: 56px 0; }
  .aw-faq__trigger { font-size: 1rem; padding: 18px 20px; }
  .aw-faq__panel { padding: 0 20px 20px; }
}

/* ================== S5 FORM ================== */

.aw-form {
  padding: 80px 0;
  background:
    linear-gradient(180deg, var(--kairikos-hueso, #faf6ee) 0%, rgba(190, 79, 51, 0.04) 100%);
}

.aw-form__card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--kairikos-hueso, #faf6ee);
  border: 1px solid var(--aw-border);
  border-radius: var(--aw-radius-2xl);
  padding: 48px 40px;
  box-shadow: var(--aw-shadow-md);
  position: relative;
  overflow: hidden;
}

.aw-form__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--kairikos-terracota, #be4f33),
    var(--kairikos-ocre, #daa520),
    var(--kairikos-terracota, #be4f33));
}

.aw-form__head { margin-bottom: 32px; text-align: center; }
.aw-form__title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--kairikos-tinta, #14181f);
}

.aw-form__sub {
  font-size: 0.98rem;
  line-height: 1.5;
  color: rgba(20, 24, 31, 0.7);
  margin: 0;
}

.aw-form__el {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aw-form__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
}

.aw-form__row--radio {
  gap: 10px;
}

.aw-form__label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--kairikos-tinta, #14181f);
}

.aw-form__optional {
  font-weight: 400;
  color: rgba(20, 24, 31, 0.55);
  font-size: 0.85rem;
}

.aw-form__input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--kairikos-tinta, #14181f);
  background: #fff;
  border: 1.5px solid var(--aw-border);
  border-radius: var(--aw-radius-lg);
  padding: 12px 16px;
  min-height: 48px;
  transition: border-color var(--aw-dur-fast) var(--aw-ease),
              box-shadow var(--aw-dur-fast) var(--aw-ease);
}

.aw-form__input::placeholder {
  color: rgba(20, 24, 31, 0.4);
}

.aw-form__input:focus {
  outline: none;
  border-color: var(--kairikos-terracota, #be4f33);
  box-shadow: 0 0 0 3px rgba(190, 79, 51, 0.12);
}

.aw-form__input:invalid:not(:placeholder-shown) {
  border-color: #c0392b;
}

.aw-form__textarea {
  min-height: 110px;
  resize: vertical;
  font-family: inherit;
}

.aw-form__radios {
  display: flex;
  gap: 12px;
}

.aw-form__radio {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  background: #fff;
  border: 1.5px solid var(--aw-border);
  border-radius: var(--aw-radius-lg);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: border-color var(--aw-dur-fast) var(--aw-ease),
              background var(--aw-dur-fast) var(--aw-ease);
}

.aw-form__radio:hover {
  border-color: rgba(190, 79, 51, 0.4);
}

.aw-form__radio input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--kairikos-terracota, #be4f33);
  margin: 0;
}

.aw-form__radio:has(input:checked) {
  border-color: var(--kairikos-terracota, #be4f33);
  background: rgba(190, 79, 51, 0.06);
  color: var(--kairikos-tinta, #14181f);
}

.aw-form__error {
  font-size: 0.85rem;
  color: #c0392b;
  margin-top: 2px;
}

.aw-form__submit {
  min-height: 52px;
  font-size: 1.05rem;
  margin-top: 8px;
  position: relative;
}

.aw-form__submit[data-aw-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
}

.aw-form__legal {
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(20, 24, 31, 0.5);
  text-align: center;
  margin: 4px 0 0;
}

.aw-form__success {
  background: rgba(40, 167, 69, 0.08);
  border: 1px solid rgba(40, 167, 69, 0.3);
  border-radius: var(--aw-radius-lg);
  padding: 16px 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1d6f3a;
}

.aw-form__success a { color: #1d6f3a; text-decoration: underline; }

/* Honeypot — a11y-safe off-screen input. Real users never see or fill it
   because of the absolute offscreen positioning + tabindex="-1" +
   aria-hidden="true" set on the template. `display: none` is deliberately
   NOT used: most browsers and many password managers will skip a
   `display: none` input when filling forms programmatically, which would
   fail to bait naive bots. */
.aw-honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.aw-honeypot label,
.aw-honeypot input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Inline error panel (KAIA-633): surfaced for 429 rate-limit and 4xx
   validation responses. Dismissible, assertive aria-live so a screen
   reader announces the error immediately. */
.aw-form__error-panel {
  position: relative;
  background: rgba(192, 57, 43, 0.06);
  border: 1px solid rgba(192, 57, 43, 0.3);
  border-left: 4px solid #c0392b;
  border-radius: var(--aw-radius-lg, 12px);
  padding: 14px 44px 14px 18px;
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #8a2a1f;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aw-form__error-panel[hidden] { display: none; }

.aw-form__error-panel strong {
  font-size: 0.98rem;
  color: #6e1f17;
}

.aw-form__error-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #8a2a1f;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.aw-form__error-dismiss:hover,
.aw-form__error-dismiss:focus-visible {
  background: rgba(192, 57, 43, 0.12);
  outline: 2px solid rgba(192, 57, 43, 0.4);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .aw-form { padding: 56px 0; }
  .aw-form__card { padding: 32px 24px; }
  .aw-form__radios { flex-direction: row; }
  .aw-form__error-dismiss { width: 36px; height: 36px; }
}

/* ================== S6 FINAL CTA ================== */

.aw-final {
  padding: 80px 0;
  background: var(--kairikos-hueso, #faf6ee);
}

.aw-final__card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: var(--kairikos-tinta, #14181f);
  color: var(--kairikos-hueso, #faf6ee);
  border-radius: var(--aw-radius-2xl);
  padding: 56px 40px;
  position: relative;
  overflow: hidden;
}

.aw-final__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(218, 165, 32, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(190, 79, 51, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.aw-final__title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  color: var(--kairikos-hueso, #faf6ee);
  position: relative;
}

.aw-final__sub {
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(250, 246, 238, 0.75);
  margin: 0 0 32px;
  position: relative;
}

.aw-final__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

.aw-final__cta { min-height: 52px; padding: 0 32px; }

.aw-final__secondary {
  font-size: 0.95rem;
  color: var(--kairikos-ocre, #daa520);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--aw-dur-fast) var(--aw-ease);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.aw-final__secondary:hover,
.aw-final__secondary:focus-visible {
  color: var(--kairikos-hueso, #faf6ee);
}

@media (max-width: 600px) {
  .aw-final { padding: 56px 0; }
  .aw-final__card { padding: 40px 24px; }
  .aw-final__actions { flex-direction: column; align-items: stretch; }
  .aw-final__cta { width: 100%; }
  .aw-final__secondary { justify-content: center; }
}

/* ================== S7 FOOTNOTE ================== */

.aw-footnote {
  padding: 32px 0 64px;
  background: var(--kairikos-hueso, #faf6ee);
  border-top: 1px solid var(--aw-border);
}

.aw-footnote__body {
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(20, 24, 31, 0.6);
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.aw-footnote__body a {
  color: var(--kairikos-terracota, #be4f33);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.aw-footnote__body a:hover { color: var(--kairikos-tinta, #14181f); }

/* ================== Accessibility helpers ================== */

.aw-page :focus-visible {
  outline: 2px solid var(--kairikos-terracota, #be4f33);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .aw-page *,
  .aw-page *::before,
  .aw-page *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================== Print ================== */

@media print {
  .aw-hero__actions,
  .aw-form,
  .aw-final__actions,
  .aw-footnote { display: none; }
}
