/* ─── OpenSpace — Main Stylesheet ─────────────────────────────────────────── */

:root {
  --navy:       #0F2942;
  --navy-dk:    #091D31;
  --navy-lt:    #1A3F62;
  --orange:     #F97316;
  --orange-lt:  #FB923C;
  --orange-dk:  #EA6C0A;
  --white:      #FFFFFF;
  --bg:         #F8FAFC;
  --bg-alt:     #F1F5F9;
  --text:       #1E293B;
  --text-muted: #64748B;
  --border:     #E2E8F0;
  --success:    #10B981;
  --error:      #EF4444;
  --warning:    #F59E0B;
  --radius:     8px;
  --radius-lg:  14px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12);
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head:  'Inter', sans-serif;
  --transition: 180ms ease;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dk); }

/* ─── Skip link ─────────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -40px; left: 16px; z-index: 999;
  background: var(--navy); color: var(--white); padding: 8px 16px;
  border-radius: var(--radius); font-size: 14px;
  transition: top var(--transition);
}
.skip-link:focus { top: 8px; }

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.container  { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container--sm { max-width: 680px; margin: 0 auto; padding: 0 24px; }
.container--md { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* ─── Header / Nav ──────────────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header__inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px; height: 64px;
}
.site-logo {
  font-size: 20px; font-weight: 700; letter-spacing: -0.5px;
  color: var(--white) !important; flex-shrink: 0;
}
.site-logo span { color: var(--orange); }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a {
  color: rgba(255,255,255,.75); font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.site-nav a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.site-nav .btn { margin-left: 8px; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer;
  border: 2px solid transparent; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--orange); color: var(--white); border-color: var(--orange); }
.btn--primary:hover { background: var(--orange-dk); border-color: var(--orange-dk); color: var(--white); }
.btn--secondary { background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.btn--secondary:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,.08); }
.btn--outline { background: transparent; color: var(--orange); border-color: var(--orange); }
.btn--outline:hover { background: var(--orange); color: var(--white); }
.btn--ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--text); color: var(--text); }
.btn--navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn--navy:hover { background: var(--navy-lt); border-color: var(--navy-lt); color: var(--white); }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--lg { padding: 16px 32px; font-size: 17px; }
.btn--full { width: 100%; justify-content: center; }

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  padding: 96px 24px 80px;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(249,115,22,.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(249,115,22,.15); border: 1px solid rgba(249,115,22,.3);
  color: var(--orange-lt); font-size: 13px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; padding: 6px 14px; border-radius: 99px;
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(36px, 6vw, 64px); font-weight: 800;
  line-height: 1.1; letter-spacing: -1.5px;
  color: var(--white); max-width: 820px; margin: 0 auto 24px;
}
.hero__title em { color: var(--orange); font-style: normal; }
.hero__sub {
  font-size: clamp(16px, 2vw, 19px); color: rgba(255,255,255,.75);
  max-width: 580px; margin: 0 auto 40px; line-height: 1.6;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.hero__scroll { margin-top: 56px; color: rgba(255,255,255,.4); font-size: 13px; }

/* ─── Section ───────────────────────────────────────────────────────────────── */
.section { padding: 80px 0; }
.section--alt { background: var(--bg); }
.section--navy { background: var(--navy); color: var(--white); }
.section__label {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 12px;
}
.section__title {
  font-size: clamp(26px, 4vw, 40px); font-weight: 800;
  letter-spacing: -0.5px; line-height: 1.15; margin-bottom: 16px;
}
.section__sub {
  font-size: 17px; color: var(--text-muted); max-width: 540px; line-height: 1.6;
}
.section--navy .section__title { color: var(--white); }
.section--navy .section__sub { color: rgba(255,255,255,.7); }

/* ─── Split (problem/solution) ──────────────────────────────────────────────── */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: center;
}
.split--flip { direction: rtl; }
.split--flip > * { direction: ltr; }
@media (max-width: 768px) { .split { grid-template-columns: 1fr; gap: 40px; } .split--flip { direction: ltr; } }

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow);
}
.card--hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); transition: all var(--transition); }

.card-grid { display: grid; gap: 24px; }
.card-grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ─── How it works steps ────────────────────────────────────────────────────── */
.steps { display: grid; gap: 32px; }
.steps--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { text-align: center; }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(249,115,22,.12); color: var(--orange);
  font-size: 20px; font-weight: 800; margin: 0 auto 16px;
}
.step__title { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--white); }
.step__desc { font-size: 15px; color: rgba(255,255,255,.65); line-height: 1.6; }

/* ─── Pricing ───────────────────────────────────────────────────────────────── */
.pricing-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.pricing-card {
  background: var(--white); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 32px;
  text-align: center; position: relative; overflow: hidden;
}
.pricing-card--featured { border-color: var(--orange); }
.pricing-card__badge {
  position: absolute; top: 0; right: 0;
  background: var(--orange); color: var(--white);
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 6px 16px; border-bottom-left-radius: var(--radius);
}
.pricing-card__label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.pricing-card__price { font-size: 48px; font-weight: 800; letter-spacing: -2px; color: var(--navy); line-height: 1; }
.pricing-card__price sup { font-size: 22px; font-weight: 700; vertical-align: super; line-height: 1; }
.pricing-card__price sub { font-size: 16px; font-weight: 500; color: var(--text-muted); }
.pricing-card__note { font-size: 14px; color: var(--text-muted); margin: 8px 0 24px; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 28px; }
.pricing-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pricing-features li:last-child { border: none; }
.pricing-features .check { color: var(--success); font-size: 16px; flex-shrink: 0; margin-top: 2px; }

/* ─── Founding member banner ─────────────────────────────────────────────────── */
.founding-banner {
  background: linear-gradient(135deg, #7c3aed 0%, var(--navy) 100%);
  border-radius: var(--radius-lg); padding: 28px 32px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-bottom: 32px;
}
.founding-banner__icon { font-size: 32px; flex-shrink: 0; }
.founding-banner__text h3 { color: var(--white); font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.founding-banner__text p { color: rgba(255,255,255,.8); font-size: 14px; }
.founding-counter {
  margin-left: auto; text-align: center; flex-shrink: 0;
  background: rgba(255,255,255,.1); border-radius: var(--radius); padding: 12px 20px;
}
.founding-counter__num { font-size: 28px; font-weight: 800; color: var(--white); line-height: 1; }
.founding-counter__label { font-size: 12px; color: rgba(255,255,255,.65); }

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-label .req { color: var(--error); margin-left: 2px; }
.form-control {
  width: 100%; padding: 11px 14px; font-size: 15px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--white); color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font);
}
.form-control:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
.form-control::placeholder { color: #94a3b8; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-hint { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 13px; color: var(--error); margin-top: 4px; }

.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-item { display: flex; align-items: center; gap: 8px; }
.checkbox-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; }
.checkbox-item label { font-size: 14px; cursor: pointer; }

/* ─── Alerts / Flash ────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius); font-size: 14px;
  border: 1px solid transparent; margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert--error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert--info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* ─── Auth pages ────────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 64px); display: flex;
  align-items: center; justify-content: center;
  padding: 40px 24px; background: var(--bg);
}
.auth-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  width: 100%; max-width: 460px; box-shadow: var(--shadow-md);
}
.auth-box__title { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.auth-box__sub   { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.auth-divider    { text-align: center; color: var(--text-muted); font-size: 13px; position: relative; margin: 20px 0; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.auth-divider span { background: var(--white); padding: 0 12px; position: relative; }

/* ─── Dashboard ─────────────────────────────────────────────────────────────── */
.dashboard-wrap { display: flex; min-height: calc(100vh - 64px); }
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--navy); padding: 28px 0;
  position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto;
}
.sidebar__section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.35); padding: 12px 20px 4px;
}
.sidebar__link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,.7); transition: all var(--transition);
}
.sidebar__link:hover, .sidebar__link.active {
  background: rgba(255,255,255,.08); color: var(--white);
}
.sidebar__link.active { border-left: 3px solid var(--orange); }
.dashboard-main { flex: 1; padding: 32px; background: var(--bg); }
.dashboard-header { margin-bottom: 28px; }
.dashboard-header h1 { font-size: 24px; font-weight: 800; color: var(--navy); }
.dashboard-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.stat-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 28px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.stat-card__label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-card__value { font-size: 32px; font-weight: 800; color: var(--navy); line-height: 1; margin: 4px 0; }
.stat-card__sub { font-size: 12px; color: var(--text-muted); }

/* ─── Tradie profile card ────────────────────────────────────────────────────── */
.tradie-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; display: flex; gap: 20px;
  transition: box-shadow var(--transition);
}
.tradie-card:hover { box-shadow: var(--shadow-md); }
.tradie-card__avatar {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: var(--navy);
}
.tradie-card__name { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.tradie-card__meta { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.tradie-card__trades { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center;
  background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; font-weight: 500;
  padding: 3px 10px; border-radius: 99px;
}
.tag--orange { background: rgba(249,115,22,.1); border-color: rgba(249,115,22,.2); color: var(--orange-dk); }
.tag--navy { background: rgba(15,41,66,.08); border-color: rgba(15,41,66,.12); color: var(--navy); }

/* ─── Stars ─────────────────────────────────────────────────────────────────── */
.stars { display: inline-flex; gap: 2px; color: #F59E0B; font-size: 16px; }
.stars--sm { font-size: 13px; }

/* ─── Photo grid ────────────────────────────────────────────────────────────── */
.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.photo-grid__item { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.photo-grid__item img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Badge ──────────────────────────────────────────────────────────────────── */
.badge-verified { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--success); background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.2); padding: 3px 10px; border-radius: 99px; }
.badge-founding { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #7c3aed; background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.2); padding: 3px 10px; border-radius: 99px; }

/* ─── Testimonial ─────────────────────────────────────────────────────────────── */
.testimonial { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.testimonial__text { font-size: 16px; line-height: 1.7; color: var(--text); margin-bottom: 20px; font-style: italic; }
.testimonial__author { display: flex; align-items: center; gap: 12px; }
.testimonial__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--bg-alt); }
.testimonial__name { font-size: 14px; font-weight: 700; color: var(--navy); }
.testimonial__role { font-size: 13px; color: var(--text-muted); }

/* ─── Trust bar ─────────────────────────────────────────────────────────────── */
.trust-bar { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: center; padding: 24px 0; }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.85); }
.trust-item__icon { font-size: 20px; }

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.site-footer { background: var(--navy-dk); padding: 56px 0 32px; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 2fr 1fr 1fr 1fr; margin-bottom: 48px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .site-logo { font-size: 22px; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,.5); margin-top: 12px; max-width: 260px; line-height: 1.6; }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,.65); margin-bottom: 8px; transition: color var(--transition); }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,.4); }

/* ─── Utilities ─────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-orange { color: var(--orange); }
.text-navy   { color: var(--navy); }
.text-white  { color: var(--white); }
.mt-4  { margin-top: 16px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.mb-8  { margin-bottom: 32px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .dashboard-main { padding: 20px 16px; }
}
@media (max-width: 768px) {
  .site-nav .nav-links { display: none; }
  .hero { padding: 64px 24px 56px; }
  .section { padding: 56px 0; }
  .auth-box { padding: 28px 20px; }
}
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { text-align: center; justify-content: center; }
}
