/* TradeCall Australia — shared design system.
   Plain CSS, no build step. Keep this file framework-free. */

:root {
  --color-bg: #ffffff;
  --color-bg-soft: #f4f7fb;
  --color-text: #1a2330;
  --color-text-muted: #5b6778;
  --color-accent: #1d6fd8;
  --color-accent-dark: #14529f;
  --color-accent-light: #e8f1fc;
  --color-success: #1f9d55;
  --color-success-light: #eaf7ef;
  --color-danger: #d92d20;
  --color-danger-light: #fcebe9;
  --color-border: #e2e6eb;

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(20, 30, 50, 0.08);
  --shadow-md: 0 4px 16px rgba(20, 30, 50, 0.10);

  --container-max: 1080px;

  /* Height of the sticky mobile CTA bar, used to pad page bottoms so it
     never covers content. Read by landing.css. */
  --mobile-cta-bar-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  font-size: 16px;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-3);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

@media (min-width: 640px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.85rem; }
}

p {
  margin: 0 0 var(--space-4);
  color: var(--color-text-muted);
}

a {
  color: var(--color-accent);
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.visually-hidden {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent-dark); }
.btn-primary:disabled {
  background: #9fb9d9;
  cursor: not-allowed;
}

.btn-secondary {
  background: #fff;
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.btn-secondary:hover { background: var(--color-accent-light); }

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: 1.05rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.site-header__logo {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-header__phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  /* On very small screens, keep the header tight: phone number shrinks to
     an icon-style tap target, CTA button stays the priority action. */
  .site-header__phone-label { display: none; }
}

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

.site-footer {
  background: var(--color-bg-soft);
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) 0 var(--space-7);
  margin-top: var(--space-7);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.site-footer__links a:hover { text-decoration: underline; }

.site-footer__meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ---------- Sticky mobile CTA bar ---------- */
/* Persistent secondary call-to-action while scrolling on small screens.
   Hidden on larger viewports where the header CTA is always visible. */

.mobile-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: #fff;
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.mobile-cta-bar .btn {
  flex: 1;
  padding: var(--space-3) var(--space-3);
}

@media (min-width: 900px) {
  .mobile-cta-bar { display: none; }
}

/* ---------- Form controls ---------- */

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
  font-size: 0.95rem;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.field {
  margin-bottom: var(--space-5);
}

.field__hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.field__error {
  font-size: 0.85rem;
  color: var(--color-danger);
  margin-top: var(--space-1);
  display: none;
}

.field--invalid input,
.field--invalid textarea {
  border-color: var(--color-danger);
}

.field--invalid .field__error {
  display: block;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.checkbox-field input {
  margin-top: 3px;
  width: auto;
}

.checkbox-field label {
  font-weight: 400;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Tappable option buttons used throughout the form (job type, urgency,
   budget, contact time) instead of free-typed input. */
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 480px) {
  .option-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4) var(--space-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--color-text);
  min-height: 56px;
}

.option-btn:hover { border-color: var(--color-accent); }

.option-btn[aria-pressed="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

.notice {
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  font-size: 0.95rem;
}

.notice--error {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.notice--success {
  background: var(--color-success-light);
  color: var(--color-success);
}
