/* =============================================
   EasyCT600 — GOV.UK inspired stylesheet
   ============================================= */

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

:root {
  --gov-blue:       #1d70b8;
  --gov-blue-dark:  #003078;
  --gov-blue-hover: #003d78;
  --gov-green:      #00703c;
  --gov-red:        #d4351c;
  --gov-yellow:     #fd0;
  --gov-black:      #0b0c0c;
  --gov-grey:       #505a5f;
  --gov-grey-light: #f3f2f1;
  --gov-border:     #b1b4b6;

  --text:           var(--gov-black);
  --text-secondary: var(--gov-grey);
  --bg:             #ffffff;

  --font: "GDS Transport", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Helvetica, Arial, sans-serif;
  --font-size-base: 19px;
  --line-height:    1.5;

  --radius:         4px;
  --max-width:      960px;
  --card-shadow:    0 2px 8px rgba(0,0,0,0.08);
}

html {
  font-size: var(--font-size-base);
  font-family: var(--font);
  line-height: var(--line-height);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

a {
  color: var(--gov-blue);
}

a:hover {
  color: var(--gov-blue-dark);
}

/* ---- Layout ---- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */

.site-header {
  background: var(--gov-blue-dark);
  border-bottom: 6px solid var(--gov-yellow);
  padding: 16px 0;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-main {
  font-size: 1.5rem;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.logo-main strong {
  font-weight: 800;
}

.logo-tag {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.header-price {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
}

.header-price strong {
  color: var(--gov-yellow);
  font-size: 1.1rem;
}

/* ---- Hero ---- */

.hero {
  background: var(--gov-blue-dark);
  color: #ffffff;
  padding: 56px 0 48px;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  max-width: 620px;
  margin-bottom: 28px;
  line-height: 1.6;
}

.hero-sub strong {
  color: var(--gov-yellow);
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
}

/* ---- Lookup Section ---- */

.lookup-section {
  padding: 48px 0;
  background: var(--gov-grey-light);
}

/* ---- Card ---- */

.card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--gov-border);
  padding: 40px;
  max-width: 640px;
}

.card h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gov-black);
}

.card-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ---- Input ---- */

.input-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1rem;
}

.input-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.text-input {
  font-family: var(--font);
  font-size: 1.1rem;
  padding: 10px 14px;
  border: 2px solid var(--gov-black);
  border-radius: var(--radius);
  width: 200px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gov-black);
  transition: border-color 0.15s;
}

form.card .text-input {
  width: 100%;
  max-width: 440px;
  letter-spacing: normal;
  text-transform: none;
}

form.card .input-row .text-input {
  width: auto;
}

.text-input:focus {
  outline: 3px solid var(--gov-yellow);
  outline-offset: 0;
  border-color: var(--gov-black);
}

.hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ---- Buttons ---- */

.btn {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  display: inline-block;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn-primary:hover:not(:disabled) {
  background: #005a30;
}

.btn-primary:disabled {
  background: var(--gov-border);
  cursor: not-allowed;
}

.btn-large {
  font-size: 1.1rem;
  padding: 14px 28px;
}

/* ---- Loading ---- */

.loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--gov-border);
  border-top-color: var(--gov-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* ---- Error ---- */

.error-box {
  border-left: 4px solid var(--gov-red);
  background: #fdf3f2;
  padding: 16px 20px;
  margin-top: 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--gov-red);
  font-size: 0.95rem;
}

.error-box p {
  margin: 0;
}

/* ---- Company Result ---- */

.company-result {
  margin-top: 28px;
  border-top: 2px solid var(--gov-border);
  padding-top: 24px;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gov-green);
  color: white;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.result-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gov-black);
  margin: 0;
  line-height: 1.3;
}

.result-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--gov-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gov-border);
  align-items: start;
}

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

.result-details dt {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 2px;
}

.result-details dd {
  font-size: 0.975rem;
  color: var(--gov-black);
  margin: 0;
}

/* ---- Status Badge ---- */

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--gov-grey-light);
  color: var(--text-secondary);
}

.status-active {
  background: #e8f5ee;
  color: var(--gov-green);
}

.status-dissolved {
  background: #fdf3f2;
  color: var(--gov-red);
}

/* ---- Notices ---- */

.notice {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.5;
}

.notice-info {
  background: #e8f5ee;
  border-left: 4px solid var(--gov-green);
  color: #0a4526;
}

.notice-warn {
  background: #fff7e6;
  border-left: 4px solid #f47738;
  color: #6a3a00;
}

.notice-error {
  background: #fdf3f2;
  border-left: 4px solid var(--gov-red);
  color: #6a1309;
}

/* ---- Proceed Section ---- */

.proceed-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--gov-border);
}

.proceed-section p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ---- How it works ---- */

.how-it-works {
  padding: 64px 0;
  background: #ffffff;
}

.how-it-works h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--gov-black);
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.steps li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--gov-blue-dark);
  color: #ffffff;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gov-black);
}

.step-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ---- Footer ---- */

.site-footer {
  background: var(--gov-black);
  color: rgba(255,255,255,0.65);
  padding: 32px 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.site-footer p + p {
  margin-top: 6px;
}

/* ---- Utility ---- */

.hidden {
  display: none !important;
}

/* ---- Responsive ---- */

@media (max-width: 700px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .card {
    padding: 24px 20px;
  }

  .header-price {
    display: none;
  }

  .input-row {
    flex-direction: column;
  }

  .text-input {
    width: 100%;
  }

  select.text-input {
    font-size: 1rem;
    padding-left: 10px;
    padding-right: 6px;
  }
}
