@font-face {
  font-family: 'Bake Sans';
  src: url('/assets/BakeSans.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --steel: #212b38;
  --steel-deep: #161e29;
  --steel-shade: #2c3744;
  --steel-light: #3a4655;
  --aqua: #6de7cc;
  --aqua-dim: #4cbfa7;
  --paper: #f4f4f1;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --muted: rgba(255, 255, 255, 0.55);
  --muted-strong: rgba(255, 255, 255, 0.75);
  --critical: #ff6b5d;
  --error: #ff6b5d;
  --success: #6de7cc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--steel-deep);
  color: var(--paper);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
}

/* ---- LAYOUT ---- */

.page {
  flex: 1;
  width: 100%;
  background-color: var(--steel);
  position: relative;
  overflow: hidden;
}

.page-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 64px 120px;
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .page-inner { padding: 48px 28px 80px; }
}

/* ---- HERO BAND (iron imagery, deck-style) ---- */

.page-hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(22, 30, 41, 0.55) 0%, rgba(22, 30, 41, 0.85) 70%, var(--steel) 100%),
    url('/assets/fend-iron.jpg') center 30% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}

.page-hero .page-inner {
  padding-top: 80px;
  padding-bottom: 56px;
}

@media (max-width: 768px) {
  .page-hero .page-inner { padding-top: 48px; padding-bottom: 36px; }
}

/* When hero band is present, body content drops the top padding it would have had */
.page-hero + .page-inner,
.page-hero ~ .page-inner {
  padding-top: 56px;
}

/* ---- HEADER ---- */

.brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.brand-logo {
  display: inline-block;
  height: 28px;
  width: auto;
}

.brand-logo svg,
.brand-logo img {
  height: 100%;
  width: auto;
  display: block;
}

.brand-tagline {
  margin-left: auto;
  font-family: 'Bake Sans', 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--paper);
  font-style: normal;
}

.brand-tagline .aqua { color: var(--aqua); }

@media (max-width: 600px) {
  .brand-tagline { display: none; }
}

/* ---- HEADINGS ---- */

.eyebrow {
  font-family: 'Bake Sans', 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--aqua);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1 {
  font-family: 'Bake Sans', 'Plus Jakarta Sans', sans-serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--paper);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.lede {
  font-size: 17px;
  color: var(--muted-strong);
  margin-bottom: 48px;
  max-width: 580px;
}

h2 {
  font-family: 'Bake Sans', 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--paper);
  margin: 40px 0 20px;
  letter-spacing: 0.01em;
}

/* ---- DETAIL CARD (pre-filled on form 2) ---- */

.detail-card {
  background: var(--steel-shade);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.detail-row {
  display: flex;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
  font-family: 'Bake Sans', 'Plus Jakarta Sans', sans-serif;
  color: var(--aqua);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  width: 160px;
  flex-shrink: 0;
}

.detail-value {
  color: var(--paper);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  word-break: break-all;
}

@media (max-width: 600px) {
  .detail-row { flex-direction: column; gap: 4px; }
  .detail-label { width: auto; }
}

/* ---- FORM FIELDS ---- */

.field {
  margin-bottom: 24px;
}

.field label {
  display: block;
  font-family: 'Bake Sans', 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  color: var(--aqua);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  background: var(--steel-deep);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 14px 16px;
  color: var(--paper);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  transition: border-color 0.15s, background 0.15s;
}

.field input[type="text"]::placeholder,
.field input[type="email"]::placeholder,
.field textarea::placeholder {
  color: rgba(255, 255, 255, 0.30);
}

.field input[type="text"]:focus,
.field input[type="email"]:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--aqua);
  background: rgba(0, 0, 0, 0.18);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.field-help {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.field-error {
  margin-top: 6px;
  font-size: 12px;
  color: var(--error);
  display: none;
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--error);
}

.field.has-error .field-error {
  display: block;
}

/* ---- CHECKLIST ---- */

.checklist {
  background: var(--steel-shade);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 4px;
  margin-bottom: 8px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.12s;
}

.checklist-item:last-child { border-bottom: none; }

.checklist-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.checklist-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: var(--steel-deep);
  cursor: pointer;
  position: relative;
  margin-top: 1px;
  transition: all 0.15s;
}

.checklist-item input[type="checkbox"]:checked {
  background: var(--aqua);
  border-color: var(--aqua);
}

.checklist-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid var(--steel-deep);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checklist-item label {
  font-size: 15px;
  color: var(--paper);
  cursor: pointer;
  flex: 1;
  line-height: 1.4;
  user-select: none;
}

.checklist-item input[type="checkbox"]:checked + label {
  color: var(--muted-strong);
  text-decoration: line-through;
  text-decoration-color: var(--aqua-dim);
}

.checklist-loading,
.checklist-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.checklist-count {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.checklist-count strong { color: var(--aqua); font-weight: 600; }

/* ---- BUTTONS ---- */

.actions {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--aqua);
  color: var(--steel-deep);
  border: none;
  padding: 16px 32px;
  border-radius: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.btn-primary:hover:not(:disabled) {
  background: #82edd2;
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

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

.btn-arrow {
  font-size: 16px;
  line-height: 1;
}

.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid var(--steel-deep);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-primary.is-loading .btn-spinner { display: inline-block; }
.btn-primary.is-loading .btn-arrow { display: none; }

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

/* ---- ALERTS ---- */

.alert {
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 24px;
  display: none;
}

.alert-error {
  background: rgba(255, 107, 93, 0.12);
  border: 1px solid rgba(255, 107, 93, 0.3);
  color: #ffb3a8;
}

.alert.is-visible { display: block; }

/* ---- FOOTER ---- */

.page-footer {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding-top: 24px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-footer a {
  color: var(--aqua);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.page-footer a:hover { border-bottom-color: var(--aqua); }

/* ---- TOGGLE SWITCH (managed DNS y/n) ---- */

.toggle-group {
  display: flex;
  gap: 0;
  background: var(--steel-deep);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 4px;
  width: fit-content;
}

.toggle-option {
  position: relative;
}

.toggle-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-option label {
  display: inline-block;
  padding: 10px 22px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-strong);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
  margin: 0;
  letter-spacing: 0;
  text-transform: none;
  user-select: none;
}

.toggle-option input[type="radio"]:checked + label {
  background: var(--aqua);
  color: var(--steel-deep);
  font-weight: 600;
}

/* ---- DNS RECORDS ---- */

.dns-block {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.dns-block.is-hidden { display: none; }

.dns-block .field-help {
  margin-bottom: 16px;
  margin-top: 0;
}

.dns-records {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dns-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.dns-row select,
.dns-row input {
  background: var(--steel-deep);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--paper);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}

.dns-row select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236de7cc' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 32px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.dns-row input {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
}

.dns-row select:focus,
.dns-row input:focus {
  outline: none;
  border-color: var(--aqua);
  background: rgba(0, 0, 0, 0.18);
}

.dns-row input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

.dns-remove {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--muted-strong);
  width: 38px;
  height: 38px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.dns-remove:hover {
  border-color: #ff6b5d;
  color: #ff6b5d;
}

.dns-add {
  margin-top: 12px;
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--muted-strong);
  padding: 10px 16px;
  border-radius: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.dns-add:hover {
  border-color: var(--aqua);
  color: var(--aqua);
  border-style: solid;
}

@media (max-width: 600px) {
  .dns-row {
    grid-template-columns: 100px 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px;
  }
  .dns-row select { grid-row: 1; grid-column: 1; }
  .dns-row .dns-name { grid-row: 1; grid-column: 2; }
  .dns-row .dns-remove { grid-row: 1; grid-column: 3; }
  .dns-row .dns-value { grid-row: 2; grid-column: 1 / 4; }
}

/* ---- CONFIRMATION PAGES ---- */

.confirmation {
  text-align: center;
  padding: 80px 0;
}

.confirmation-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--aqua);
  border-radius: 50%;
  margin-bottom: 32px;
  color: var(--steel-deep);
  font-size: 36px;
  font-weight: 700;
}

.confirmation h1 {
  font-size: 32px;
  margin-bottom: 16px;
}

.confirmation p {
  color: var(--muted-strong);
  font-size: 16px;
  max-width: 500px;
  margin: 0 auto 16px;
}

.ticket-id {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 16px;
  background: var(--steel-shade);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--aqua);
}
