/* ==========================================================================
   HexaMSP — components.css
   Buttons, icons, cards, lists, tables, forms, and other reusable pieces.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Buttons
   Coral is reserved for the single primary action on a screen. Everything
   else is a cyan outline or a plain text link, which is what keeps the coral
   readable as "this is the thing to click".
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--step-sm);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.005em;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.btn .icon { flex: none; }

/* Primary — coral fill with navy text. Dark-on-coral clears AA comfortably;
   white-on-coral does not. */
.btn--primary {
  background: var(--coral);
  color: var(--navy-900);
}
.btn--primary:hover {
  background: var(--coral-hi);
  color: var(--navy-900);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -14px rgba(255, 122, 69, 0.75);
}
.btn--primary:active { transform: none; }

.btn--secondary {
  background: transparent;
  border-color: var(--cyan-line);
  color: var(--cyan);
}
.btn--secondary:hover {
  background: var(--cyan-wash);
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

.btn--quiet {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-muted);
}
.btn--quiet:hover { border-color: var(--paper); color: var(--paper); }

.btn--sm { padding: 0.6rem 1.1rem; font-size: var(--step-xs); }
.btn--lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* Text link with a nudging arrow */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step-sm);
  font-weight: 600;
  color: var(--cyan);
}
.arrow-link .icon { transition: transform var(--t-mid); }
.arrow-link:hover { color: var(--paper); }
.arrow-link:hover .icon { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   2. Icons
   -------------------------------------------------------------------------- */
.icon {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 16px; height: 16px; stroke-width: 1.8; }
.icon--lg { width: 24px; height: 24px; }

/* Hex-framed icon: the logo's hexagon reused as the icon container so the
   service set reads as part of the mark rather than generic stock glyphs. */
.hexicon { width: 54px; height: 62px; overflow: visible; flex: none; }
.hexicon__frame {
  fill: var(--cyan-wash);
  stroke: var(--cyan-line);
  stroke-width: 1.25;
  transition: fill var(--t-mid), stroke var(--t-mid);
}
.hexicon__glyph {
  color: var(--cyan);
  stroke: var(--cyan);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color var(--t-mid);
}
.hexicon--sm { width: 38px; height: 44px; }

/* --------------------------------------------------------------------------
   3. Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.75rem;
  background: var(--navy-700);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--t-mid), transform var(--t-mid), box-shadow var(--t-mid);
}
/* Card titles sit smaller than the global H3 step so four-up grids keep
   their titles to one or two lines. */
.card h3 { margin-top: 0.25rem; font-size: 1.1875rem; }
.card h3 a { color: var(--paper); }
.card p { color: var(--text-muted); font-size: var(--step-sm); line-height: 1.6; margin: 0; }

.card--link:hover,
.card--link:focus-within {
  border-color: var(--cyan-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.card--link:hover .hexicon__frame,
.card--link:focus-within .hexicon__frame {
  fill: var(--cyan-wash-2);
  stroke: var(--cyan);
}
.card--link:hover h3 a,
.card--link:focus-within h3 a { color: var(--cyan); }

/* Whole-card click target without nesting interactive elements */
.card__cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__foot { margin-top: auto; padding-top: 0.35rem; }

.card-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 620px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .card-grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px)  { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* --------------------------------------------------------------------------
   4. Principle rows ("The HexaMSP Difference")
   Deliberately not cards and not numbered — these are four parallel claims,
   not a sequence, so they get hairline rules instead of step markers.
   -------------------------------------------------------------------------- */
.principles { border-top: 1px solid var(--line); }
.principle {
  display: grid;
  gap: 0.75rem 2.5rem;
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  transition: background var(--t-mid);
}
.principle__label {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.principle__body p { color: var(--text-muted); margin-top: 0.6rem; }
.principle h3 { color: var(--paper); }

@media (min-width: 860px) {
  .principle { grid-template-columns: 15rem 1fr; align-items: start; }
  .principle__label { padding-top: 0.35rem; }
}

/* --------------------------------------------------------------------------
   5. Feature lists
   -------------------------------------------------------------------------- */
.ticks { display: flex; flex-direction: column; gap: 0.75rem; }
.ticks li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.75rem;
  align-items: start;
  font-size: var(--step-sm);
  color: var(--text-muted);
  line-height: 1.55;
}
.ticks .icon { color: var(--cyan); margin-top: 0.2rem; }
.ticks b { color: var(--paper); font-weight: 600; }

/* --------------------------------------------------------------------------
   6. Pricing
   -------------------------------------------------------------------------- */
.tiers { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .tiers { grid-template-columns: repeat(2, 1fr); } }

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--navy-700);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.tier--featured {
  border-color: var(--cyan-line);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.12), var(--shadow-card);
}
.tier__flag {
  position: absolute;
  top: 0; right: clamp(1.75rem, 3vw, 2.5rem);
  transform: translateY(-50%);
  padding: 0.35rem 0.8rem;
  background: var(--cyan);
  color: var(--navy-900);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 3px;
}
.tier__name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.tier__for { margin-top: 0.5rem; color: var(--text-muted); font-size: var(--step-sm); }
.tier__price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
}
.tier__amount { font-size: clamp(2.5rem, 5vw, 3.25rem); font-weight: 500; color: var(--paper); letter-spacing: -0.03em; line-height: 1; }
.tier__unit { font-size: var(--step-xs); color: var(--text-faint); line-height: 1.35; letter-spacing: 0.02em; }
.tier__rule { margin-block: 1.75rem; border: 0; border-top: 1px solid var(--line); }
.tier__inc {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.1rem;
}
.tier .btn { margin-top: 2rem; }
.tier__note { margin-top: 0.9rem; font-size: var(--step-xs); color: var(--text-faint); text-align: center; }

/* Comparison table ------------------------------------------------------- */
.compare-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare { font-size: var(--step-sm); }
.compare th, .compare td { padding: 0.9rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
/* Not sticky on purpose: .compare-wrap clips with overflow:hidden for its
   rounded corners, which makes a sticky thead stick to the wrapper rather
   than the viewport and overlap the first row. The table is short enough
   that a pinned header is not worth that trade. */
.compare thead th {
  background: var(--navy-600);
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
}
.compare tbody th { font-weight: 400; color: var(--text-muted); }
.compare td { text-align: center; width: 22%; }
.compare thead th:not(:first-child) { text-align: center; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody tr:hover th, .compare tbody tr:hover td { background: rgba(0, 212, 255, 0.035); }
.compare .yes { color: var(--cyan); }
.compare .no { color: var(--text-faint); }
.compare .cell-note { display: block; font-size: 0.75rem; color: var(--text-faint); }
.compare__group th {
  background: var(--navy-800);
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

@media (max-width: 560px) {
  .compare th, .compare td { padding: 0.75rem 0.6rem; font-size: 0.8125rem; }
  .compare td { width: 24%; }
}

/* Add-on / custom-quote rows --------------------------------------------- */
.addon {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--navy-700);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.addon__price { font-family: var(--font-mono); color: var(--paper); font-size: 1.375rem; letter-spacing: -0.01em; }
.addon__price small { display: block; font-size: var(--step-xs); color: var(--text-faint); letter-spacing: 0.02em; margin-top: 0.25rem; }
.addon p { color: var(--text-muted); font-size: var(--step-sm); }
@media (min-width: 800px) {
  .addon { grid-template-columns: 3.25rem 1fr 14rem; align-items: center; gap: 2rem; }
  .addon__price { text-align: right; }
}

/* --------------------------------------------------------------------------
   7. Testimonial placeholders
   Empty on purpose. Structure and styling are ready; the quotes are left for
   real clients rather than invented.
   -------------------------------------------------------------------------- */
.quote-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .quote-grid { grid-template-columns: repeat(3, 1fr); } }

.quote {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem;
  background: var(--navy-700);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.quote__mark { color: var(--cyan); opacity: 0.5; }
.quote blockquote { color: var(--text-faint); font-size: var(--step-sm); line-height: 1.65; font-style: italic; }
.quote figcaption { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--step-xs); color: var(--text-faint); letter-spacing: 0.04em; }

/* --------------------------------------------------------------------------
   8. Forms
   -------------------------------------------------------------------------- */
.form { display: grid; gap: 1.25rem; }
.form__row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: repeat(2, 1fr); } }

.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field label .req { color: var(--coral); margin-left: 0.2rem; }
.field .opt { color: var(--text-faint); letter-spacing: 0.08em; text-transform: none; font-size: 0.6875rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: var(--navy-900);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--paper);
  font-size: var(--step-sm);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: rgba(245, 248, 251, 0.32); }

.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(245, 248, 251, 0.26); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.16);
}

/* Native select needs an explicit arrow once the default chrome is restyled */
.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='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2300D4FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}
.field select option { background: var(--navy-700); color: var(--paper); }

.field__error {
  display: none;
  font-family: var(--font-body);
  font-size: var(--step-xs);
  letter-spacing: 0;
  text-transform: none;
  color: var(--coral);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--coral); }
.field.has-error .field__error { display: block; }

.form__consent { font-size: var(--step-xs); color: var(--text-faint); line-height: 1.6; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }

/* Post-submit confirmation */
.form-success {
  display: none;
  gap: 1rem;
  padding: 2rem;
  background: var(--navy-700);
  border: 1px solid var(--cyan-line);
  border-radius: var(--radius);
}
.form-success.is-shown { display: grid; }
.form-success h2 { color: var(--paper); font-family: var(--font-display); font-size: 1.375rem; }
.form-success p { color: var(--text-muted); font-size: var(--step-sm); }
.form.is-hidden { display: none; }

/* --------------------------------------------------------------------------
   9. Misc
   -------------------------------------------------------------------------- */
.panel {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--navy-700);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel--accent { border-left: 2px solid var(--cyan); }

.stack-sm > * + * { margin-top: 0.75rem; }
.stack   > * + * { margin-top: 1.25rem; }
.stack-lg > * + * { margin-top: 2rem; }

.prose p { color: var(--text-muted); }
.prose > * + * { margin-top: 1.25rem; }
.prose h2 { margin-top: 2.75rem; }
.prose h3 { margin-top: 2rem; }
