/* ==========================================================================
   Sol Genesys — Components
   --------------------------------------------------------------------------
   1. Buttons and arrow links
   2. Hexagon list bullets and step numbers (the brand motif)
   3. Rows (name on the left, description on the right)
   4. FAQ
   5. Call-to-action band
   6. Form fields
   7. Radio and checkbox options
   8. Alert, note, spinner
   ========================================================================== */

/* 1. Buttons and arrow links ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--duration) ease, border-color var(--duration) ease, color var(--duration) ease;
}

.btn--primary {
  background: var(--color-accent);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
}

.btn--outline {
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn--outline:hover {
  border-color: var(--color-text);
}

/* For use on the blue call-to-action band */
.btn--light {
  background: #ffffff;
  color: var(--color-bg);
}

.btn--light:hover {
  background: #dfe3ea;
}

.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.btn--sm {
  padding: 0.625rem 1.125rem;
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* "See services →" */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent-text);
  transition: color var(--duration) ease;
}

.arrow-link .icon {
  width: 1.125em;
  height: 1.125em;
  transition: transform var(--duration) var(--ease);
}

.arrow-link:hover {
  color: var(--color-text);
}

.arrow-link:hover .icon {
  transform: translateX(3px);
}

/* 2. Hexagon list bullets and step numbers --------------------------------- */
.hex-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
}

.hex-list li {
  position: relative;
  padding-left: var(--space-5);
}

/* Small filled hexagon, pointy-top like the logo */
.hex-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.625rem;
  height: 0.72rem;
  background: var(--color-accent-text);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

/* Number inside a hexagon outline */
.hex-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 3.175rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 60'%3E%3Cpath d='M26 2 49.4 15.5v29L26 58 2.6 44.5v-29z' fill='none' stroke='%237aa2ff' stroke-width='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

/* 3. Rows ------------------------------------------------------------------ */
.rows {
  list-style: none;
  padding: 0;
  border-bottom: 1px solid var(--color-border);
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2) var(--space-6);
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .row {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}

.row h3 {
  font-size: 1.125rem;
}

/* 4. FAQ (native <details>) ------------------------------------------------ */
.faq-list {
  border-bottom: 1px solid var(--color-border);
}

.faq {
  border-top: 1px solid var(--color-border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--color-accent-text);
  transition: transform var(--duration) var(--ease);
}

.faq[open] summary .icon {
  transform: rotate(180deg);
}

.faq p {
  max-width: 44rem;
  padding-bottom: var(--space-5);
}

/* 5. Call-to-action band --------------------------------------------------- */
.cta-band {
  padding-block: var(--space-8);
  background: var(--color-accent);
  color: rgba(255, 255, 255, 0.88);
}

.cta-band__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

@media (min-width: 1024px) {
  .cta-band__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cta-band h2 {
  font-size: var(--text-h2);
  color: #ffffff;
}

.cta-band p {
  margin-top: var(--space-2);
  font-size: var(--text-lg);
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* 6. Form fields ----------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field__label,
.fieldset__legend {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.fieldset__legend {
  margin-bottom: var(--space-3);
  padding: 0;
}

.field__optional {
  font-weight: 400;
  color: var(--color-text-subtle);
}

.field__hint {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

.field__error {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-error);
}

.input,
.textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-base);
  transition: border-color var(--duration) ease;
}

.textarea {
  min-height: 7rem;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-subtle);
  opacity: 1;
}

.input:focus,
.textarea:focus {
  outline: 2px solid var(--color-accent-text);
  outline-offset: 0;
  border-color: transparent;
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--color-error);
}

.input[readonly] {
  color: var(--color-text-subtle);
}

/* Light calendar icon on the dark date field */
.input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}

/* 7. Radio and checkbox options --------------------------------------------
   Markup: <label class="choice"><input class="choice__input" type="radio">
           <span class="choice__box"><span class="choice__marker"></span>
           <span class="choice__text">…</span></span></label>
   The real input stays in the page (visually hidden) so keyboards and
   screen readers work normally. */
.choice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
}

@media (min-width: 640px) {
  .choice-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.choice {
  position: relative;
  display: flex;
  cursor: pointer;
}

.choice__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice__box {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  transition: border-color var(--duration) ease, background-color var(--duration) ease;
}

.choice:hover .choice__box {
  border-color: var(--color-text-subtle);
}

.choice__input:checked + .choice__box {
  border-color: var(--color-accent-text);
  background: var(--color-surface);
}

.choice__input:focus-visible + .choice__box {
  outline: 2px solid var(--color-accent-text);
  outline-offset: 2px;
}

/* Radio marker: hexagon outline, filled when selected */
.choice__marker {
  position: relative;
  flex-shrink: 0;
  width: 1rem;
  height: 1.155rem;
  margin-top: 0.125rem;
  background: var(--color-border-strong);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.choice__marker::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--color-bg);
  clip-path: inherit;
}

.choice__input:checked + .choice__box .choice__marker {
  background: var(--color-accent-text);
}

.choice__input:checked + .choice__box .choice__marker::after {
  inset: 4px;
  background: var(--color-accent-text);
}

/* Checkbox marker: square with a tick */
.choice__marker--check {
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  clip-path: none;
}

.choice__marker--check::after {
  content: "";
  inset: auto;
  left: 0.3rem;
  top: 0.1rem;
  width: 0.3rem;
  height: 0.55rem;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  background: transparent;
  clip-path: none;
  transform: rotate(45deg);
  opacity: 0;
}

.choice__input:checked + .choice__box .choice__marker--check {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.choice__input:checked + .choice__box .choice__marker--check::after {
  inset: auto;
  background: transparent;
  opacity: 1;
}

.choice__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.choice__title {
  font-weight: 600;
  color: var(--color-text);
}

.choice__desc {
  font-size: var(--text-sm);
}

/* 8. Alert, note, spinner -------------------------------------------------- */
.alert {
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--color-error);
  background: rgba(255, 138, 128, 0.07);
}

.alert__title {
  font-weight: 600;
  color: var(--color-text);
}

.alert__text {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
}

.alert__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.note {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
