/**
 * Reusable primitives: buttons, the hexagon icon, chips, form fields, carousel
 * dots and the small badges that recur across sections.
 *
 * Button sizing is expressed as named roles rather than a t-shirt scale,
 * because the design does not use one — each call to action was tuned to its
 * surroundings, and inventing a scale here would round those decisions away.
 */

/* ================================================================= buttons */

.dk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 19px 40px;
  border: 0;
  border-radius: var(--dk-radius-sm);
  font-family: var(--dk-font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--dk-track-button);
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

/* --- fills ---------------------------------------------------------- */

.dk-btn--solid {
  background: var(--dk-blue);
  color: var(--dk-on-dark);
}

.dk-btn--solid:hover {
  background: var(--dk-blue-hover);
  color: var(--dk-on-dark);
}

/** Outline on a light surface; fills with blue on hover. */
.dk-btn--ghost {
  background: transparent;
  border: 1px solid var(--dk-border-button);
  color: var(--dk-blue);
}

.dk-btn--ghost:hover {
  background: var(--dk-blue);
  border-color: var(--dk-blue);
  color: var(--dk-on-dark);
}

/** Same, but sitting on the beige band, so it needs its own white ground. */
.dk-btn--ghost-filled {
  background: var(--dk-white);
}

/** Outline on a dark surface. */
.dk-btn--on-dark {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: var(--dk-on-dark);
}

.dk-btn--on-dark:hover {
  background: var(--dk-blue);
  border-color: var(--dk-blue);
  color: var(--dk-on-dark);
}

/** Outline on white, used by the drawer's secondary action. */
.dk-btn--outline {
  background: transparent;
  border: 1px solid var(--dk-border-strong);
  color: var(--dk-navy);
}

.dk-btn--outline:hover {
  background: var(--dk-blue);
  border-color: var(--dk-blue);
  color: var(--dk-on-dark);
}

/* --- sizes ---------------------------------------------------------- */

/** Section-closing call to action. This is the default; listed for clarity. */
.dk-btn--section {
  padding: 19px 40px;
}

.dk-btn--wide {
  padding: 18px 36px;
}

.dk-btn--medium {
  padding: 18px 32px;
}

/** Hero pair: lighter weight, wider tracking than the section buttons. */
.dk-btn--hero {
  padding: 17px 34px;
  font-weight: 600;
  letter-spacing: var(--dk-track-caps);
}

/** Full-width actions inside the mobile drawer. */
.dk-btn--drawer {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  gap: 10px;
}

/** Footer call to action. */
.dk-btn--compact {
  padding: 15px 22px;
  font-size: 13px;
  font-weight: 600;
  gap: 10px;
}

.dk-btn--footer:hover {
  background: var(--dk-blue-bright);
}

/** "Send another" after a successful submission. */
.dk-btn--quiet {
  padding: 15px 26px;
  border: 1px solid var(--dk-border-strong);
  background: var(--dk-white);
  color: var(--dk-blue);
  font-size: 13px;
  font-weight: 600;
}

.dk-btn--quiet:hover {
  background: var(--dk-blue);
  border-color: var(--dk-blue);
  color: var(--dk-on-dark);
}

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

/* --- icon buttons --------------------------------------------------- */

/** Circular control on a dark surface: the hero and testimonial arrows. */
.dk-iconbtn {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid var(--dk-on-dark-edge);
  border-radius: 50%;
  background: var(--dk-on-dark-veil);
  color: var(--dk-on-dark);
  font-size: 15px;
  cursor: pointer;
}

.dk-iconbtn:hover {
  background: var(--dk-blue);
  border-color: var(--dk-blue);
  color: var(--dk-on-dark);
}

/** The testimonial variant is a touch larger with a stronger edge. */
.dk-iconbtn--quote {
  width: 56px;
  height: 56px;
  border-color: var(--dk-on-dark-edge-strong);
  background: none;
  font-size: 16px;
}

/** Round social link in the footer. */
.dk-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--dk-on-dark-edge);
  border-radius: var(--dk-radius-pill);
  color: var(--dk-on-dark);
  font-size: 16px;
}

.dk-social:hover {
  background: var(--dk-blue);
  border-color: var(--dk-blue);
  color: var(--dk-on-dark);
}

/* ============================================================ hexagon icon */

/**
 * The brand's repeated motif: a hexagonal plinth with a glyph centred on it.
 * Size comes from `--dk-hexicon-size` (set inline by the factory) and the glyph
 * is tuned per use through `--dk-hexicon-glyph`.
 */
.dk-hexicon {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--dk-hexicon-size, 46px);
  height: var(--dk-hexicon-size, 46px);
}

.dk-hexicon__plinth {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dk-hexicon__glyph {
  position: relative;
  display: block;
  font-size: var(--dk-hexicon-glyph, 18px);
  line-height: 1;
  color: var(--dk-hexicon-color, var(--dk-blue));
}

/* ================================================================== chips */

/** Single-select topic chip in the call-back form. */
.dk-chip {
  padding: 9px 15px;
  border: 1px solid var(--dk-border-strong);
  border-radius: var(--dk-radius-pill);
  background: var(--dk-white);
  color: var(--dk-muted-warm);
  font-family: var(--dk-font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}

.dk-chip:hover {
  border-color: var(--dk-blue);
  color: var(--dk-blue);
}

.dk-chip[aria-pressed='true'] {
  background: var(--dk-blue);
  border-color: var(--dk-blue);
  color: var(--dk-on-dark);
}

/* ============================================================ form fields */

.dk-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/** The numbered step marker beside each field label. */
.dk-field__step {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--dk-radius-pill);
  background: var(--dk-blue-wash-warm);
  font: 600 11px/1 var(--dk-font-display);
  color: var(--dk-blue);
}

.dk-field__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 15px/1.3 var(--dk-font-body);
  color: var(--dk-ink);
}

.dk-field__optional {
  font: 400 14px/1 var(--dk-font-body);
  color: var(--dk-muted);
}

/** Phone input: a fixed `+38` prefix, the field, and a validity tick. */
.dk-phone {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--dk-border-strong);
  border-radius: var(--dk-radius-sm);
  background: var(--dk-white);
  overflow: hidden;
}

/**
 * The composite owns the focus indicator.
 *
 * Left to the global `input:focus-visible` rule, the inner input drew its own
 * 2px outline at a 3px offset. `overflow: hidden` on this wrapper clipped the
 * top and bottom of that ring, leaving its two vertical segments showing as
 * stray blue bars either side of the number. Suppressing it is safe only
 * because `:focus-within` below paints a stronger indicator around the whole
 * control — never remove one without the other.
 */
.dk-phone__input:focus,
.dk-phone__input:focus-visible {
  outline: none;
}

.dk-phone:focus-within {
  border-color: var(--dk-blue);
  box-shadow: var(--dk-focus-halo);
}

.dk-phone--valid {
  border-color: var(--dk-success);
}

.dk-phone--invalid {
  border-color: var(--dk-error);
}

/* An invalid field keeps its red while being corrected: the error message is
   still on screen, and a blue border beside it would contradict it. */
.dk-phone--invalid:focus-within {
  border-color: var(--dk-error);
  box-shadow: var(--dk-focus-halo-error);
}

.dk-phone__prefix {
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 4px 0 18px;
  font: 500 17px/1 var(--dk-font-body);
  color: var(--dk-muted);
}

.dk-phone__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 17px 12px;
  border: 0;
  background: transparent;
  font: 500 17px/1.3 var(--dk-font-body);
  letter-spacing: 0.03em;
  color: var(--dk-ink);
  outline: none;
}

.dk-phone__tick {
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: var(--dk-success);
  font-size: 15px;
}

.dk-textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--dk-border-strong);
  border-radius: var(--dk-radius-sm);
  background: var(--dk-white);
  font: 400 15px/1.6 var(--dk-font-body);
  color: var(--dk-ink);
  outline: none;
  resize: vertical;
}

/* Matched to the phone field so the two controls focus identically: border
   turns brand blue, with the same halo around it, and no second ring. */
.dk-textarea:focus,
.dk-textarea:focus-visible {
  outline: none;
  border-color: var(--dk-blue);
  box-shadow: var(--dk-focus-halo);
}

/** Inline validation and delivery messages. */
.dk-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 14px/1.4 var(--dk-font-body);
  color: var(--dk-error-text);
}

.dk-notice i {
  font-size: 13px;
}

/* ================================================================== dots */

/** Hero pagination: a pill that widens when active. */
.dk-dot {
  height: 5px;
  width: 12px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition:
    width var(--dk-speed-slow) ease,
    background-color var(--dk-speed-slow) ease;
}

.dk-dot[aria-selected='true'] {
  width: 26px;
  background: var(--dk-blue);
}

/** Testimonial pagination: a rotated square. */
.dk-diamond {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  transform: rotate(45deg);
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.dk-diamond[aria-selected='true'] {
  background: var(--dk-on-dark);
}

/* ================================================================ badges */

/** Rating pill under the testimonial. */
.dk-rating {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border: 1px solid var(--dk-amber-ring);
  border-radius: var(--dk-radius-pill);
}

.dk-rating__value {
  font: 700 20px/1 var(--dk-font-display);
  color: var(--dk-on-dark);
}

.dk-rating__label {
  font: 500 11px/1.4 var(--dk-font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
  text-align: left;
}

.dk-stars {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dk-stars i {
  font-size: 14px;
  color: var(--dk-amber);
}

/* The rating pills use the warmer star tone against the navy band. */
.dk-rating .dk-stars i {
  color: var(--dk-amber-star);
}
