/* ============================================
   FITOUT BRIEF — Design System
   Australia's Commercial Interiors Publication
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── Variables ── */
:root {
  --ink:        #1A1A1A;
  --paper:      #F7F4EF;
  --brass:      #C8973E;
  --brass-dark: #A67C2E;
  --slate:      #3B5068;
  --slate-light:#4E6785;
  --grey-1:     #8A8A8A;
  --grey-2:     #C4C0BB;
  --grey-3:     #E8E4DF;
  --white:      #FFFFFF;
  --red:        #C0392B;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 2px;
  --radius:    4px;
  --radius-md: 6px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(26,26,26,0.08);
  --shadow:    0 4px 16px rgba(26,26,26,0.10);
  --shadow-lg: 0 12px 40px rgba(26,26,26,0.14);
  --shadow-xl: 0 24px 64px rgba(26,26,26,0.18);

  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;

  --container: 1200px;
  --container-narrow: 800px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); background: var(--paper); color: var(--ink); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ── Container ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container--narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ── Typography ── */
.display-1 { font-family: var(--font-display); font-size: var(--text-7xl); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; }
.display-2 { font-family: var(--font-display); font-size: var(--text-6xl); font-weight: 400; line-height: 1.08; letter-spacing: -0.02em; }
.display-3 { font-family: var(--font-display); font-size: var(--text-5xl); font-weight: 400; line-height: 1.1; letter-spacing: -0.015em; }
.heading-1 { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
.heading-2 { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 500; line-height: 1.2; }
.heading-3 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 500; line-height: 1.25; }
.heading-4 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; line-height: 1.3; }
.body-lg { font-size: var(--text-lg); line-height: 1.7; font-weight: 300; }
.body { font-size: var(--text-base); line-height: 1.65; }
.body-sm { font-size: var(--text-sm); line-height: 1.6; }
.caption { font-size: var(--text-xs); line-height: 1.5; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; }
.eyebrow { font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--brass); }

/* ── Colours ── */
.text-ink    { color: var(--ink); }
.text-paper  { color: var(--paper); }
.text-brass  { color: var(--brass); }
.text-slate  { color: var(--slate); }
.text-grey   { color: var(--grey-1); }
.bg-ink      { background-color: var(--ink); }
.bg-paper    { background-color: var(--paper); }
.bg-brass    { background-color: var(--brass); }
.bg-slate    { background-color: var(--slate); }
.bg-white    { background-color: var(--white); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--brass);
  color: var(--white);
}
.btn--primary:hover { background: var(--brass-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--secondary {
  background: var(--ink);
  color: var(--white);
}
.btn--secondary:hover { background: #2d2d2d; transform: translateY(-1px); }
.btn--outline {
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--outline-white {
  border: 1.5px solid rgba(247,244,239,0.4);
  color: var(--paper);
  background: transparent;
}
.btn--outline-white:hover { background: rgba(247,244,239,0.1); border-color: var(--paper); }
.btn--ghost { color: var(--ink); }
.btn--ghost:hover { color: var(--brass); }
.btn--sm { padding: 0.5rem 1rem; font-size: var(--text-xs); }
.btn--lg { padding: 1rem 2rem; font-size: var(--text-base); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}
.badge--brass   { background: rgba(200,151,62,0.12); color: var(--brass-dark); }
.badge--slate   { background: rgba(59,80,104,0.1); color: var(--slate); }
.badge--ink     { background: var(--ink); color: var(--paper); }
.badge--outline { border: 1px solid var(--grey-2); color: var(--grey-1); }
.badge--featured { background: var(--brass); color: var(--white); }
.badge--premium  { background: var(--ink); color: var(--paper); }
.badge--standard { border: 1px solid var(--grey-2); color: var(--grey-1); background: transparent; }
.badge--verified { background: rgba(59,80,104,0.1); color: var(--slate); }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--grey-3);
  backdrop-filter: blur(8px);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.nav__wordmark {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.nav__wordmark span { color: var(--brass); }
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--grey-1);
  transition: color var(--transition);
}
.nav__link:hover { color: var(--ink); }
.nav__link--active { color: var(--ink); }
.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.nav__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}
.nav__mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: all var(--transition);
}

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Listing Card */
.listing-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-3);
  position: relative;
  cursor: pointer;
}
.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.listing-card--featured {
  border-left: 3px solid var(--brass);
}
.listing-card__header {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.listing-card__logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  object-fit: contain;
  background: var(--grey-3);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--white);
  background: var(--slate);
}
.listing-card__info { flex: 1; min-width: 0; }
.listing-card__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: var(--space-1);
}
.listing-card__tagline {
  font-size: var(--text-sm);
  color: var(--grey-1);
  line-height: 1.4;
}
.listing-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.listing-card__location {
  font-size: var(--text-xs);
  color: var(--grey-1);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Article Card */
.article-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-3);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.article-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--grey-3);
}
.article-card__image--placeholder {
  background: linear-gradient(135deg, var(--slate) 0%, var(--ink) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-card__body { padding: var(--space-5); flex: 1; display: flex; flex-direction: column; gap: var(--space-3); }
.article-card__category { color: var(--brass); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.article-card__title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; line-height: 1.25; color: var(--ink); }
.article-card__excerpt { font-size: var(--text-sm); color: var(--grey-1); line-height: 1.6; flex: 1; }
.article-card__footer { display: flex; justify-content: space-between; align-items: center; padding-top: var(--space-3); border-top: 1px solid var(--grey-3); margin-top: auto; }
.article-card__date { font-size: var(--text-xs); color: var(--grey-2); }
.article-card__read-time { font-size: var(--text-xs); color: var(--grey-2); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: var(--space-2); }
.form-label { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.form-label--required::after { content: ' *'; color: var(--red); }
.form-input {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--grey-3);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--ink);
  background: var(--white);
  transition: border-color var(--transition);
  width: 100%;
}
.form-input:focus { outline: none; border-color: var(--slate); }
.form-input::placeholder { color: var(--grey-2); }
.form-input--error { border-color: var(--red); }
.form-error { font-size: var(--text-xs); color: var(--red); }
.form-hint { font-size: var(--text-xs); color: var(--grey-1); }
textarea.form-input { resize: vertical; min-height: 120px; }
select.form-input { 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='%238A8A8A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.char-count { font-size: var(--text-xs); color: var(--grey-1); text-align: right; }
.char-count--warning { color: var(--brass); }
.char-count--over { color: var(--red); }

/* ── Grid ── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-6); }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--grey-3); }
.divider--dark { border-top-color: rgba(247,244,239,0.12); }

/* ── Section ── */
.section { padding: var(--space-20) 0; }
.section--sm { padding: var(--space-12) 0; }
.section--lg { padding: var(--space-32) 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--slate { background: var(--slate); color: var(--paper); }
.section-header { margin-bottom: var(--space-10); }
.section-header--centered { text-align: center; }

/* ── Loading skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--grey-3) 25%, var(--grey-2) 50%, var(--grey-3) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Toast notifications ── */
.toast-container { position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: 1000; display: flex; flex-direction: column; gap: var(--space-3); }
.toast {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  animation: toast-in 0.3s ease;
  max-width: 360px;
}
.toast--success { background: var(--ink); color: var(--paper); }
.toast--error { background: var(--red); color: var(--white); }
@keyframes toast-in { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Footer ── */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-16) 0 var(--space-8);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}
.footer__brand {}
.footer__wordmark {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--paper);
  margin-bottom: var(--space-4);
}
.footer__wordmark span { color: var(--brass); }
.footer__tagline { font-size: var(--text-sm); color: rgba(247,244,239,0.5); line-height: 1.6; max-width: 280px; }
.footer__heading { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(247,244,239,0.4); margin-bottom: var(--space-4); }
.footer__links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer__link { font-size: var(--text-sm); color: rgba(247,244,239,0.6); transition: color var(--transition); }
.footer__link:hover { color: var(--paper); }
.footer__bottom {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(247,244,239,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer__legal { font-size: var(--text-xs); color: rgba(247,244,239,0.3); }
.footer__social { display: flex; gap: var(--space-4); }
.footer__social-link { color: rgba(247,244,239,0.4); transition: color var(--transition); }
.footer__social-link:hover { color: var(--paper); }

/* ── Empty states ── */
.empty-state {
  text-align: center;
  padding: var(--space-20) var(--space-8);
  color: var(--grey-1);
}
.empty-state__icon { font-size: 3rem; margin-bottom: var(--space-4); opacity: 0.4; }
.empty-state__title { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--ink); margin-bottom: var(--space-3); }
.empty-state__body { font-size: var(--text-base); max-width: 400px; margin: 0 auto var(--space-6); }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: var(--space-3); margin-top: var(--space-12); }
.load-more-btn { display: block; margin: var(--space-10) auto 0; }

/* ── Breadcrumb ── */
.breadcrumb { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--grey-1); margin-bottom: var(--space-6); }
.breadcrumb__sep { color: var(--grey-2); }
.breadcrumb__current { color: var(--ink); font-weight: 500; }

/* ── Utilities ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .display-1 { font-size: var(--text-6xl); }
  .display-2 { font-size: var(--text-5xl); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}
@media (max-width: 768px) {
  .display-1 { font-size: var(--text-5xl); }
  .display-2 { font-size: var(--text-4xl); }
  .display-3 { font-size: var(--text-3xl); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .nav__mobile-toggle { display: flex; }
  .section { padding: var(--space-12) 0; }
  .section--lg { padding: var(--space-20) 0; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer__bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .display-1 { font-size: var(--text-4xl); }
  .display-2 { font-size: var(--text-3xl); }
}
