/* ============================================
   ANTIPODEAN.AI — Carousel Deck Styles v3
   Two-colour system: #2E4034 + #748C7F
   ============================================ */

@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@400,700,800&f[]=satoshi@300,400,500,700&display=swap');

/* --- Palette (two brand colours only) --- */
:root {
  --brand-dark:   #2E4034;
  --brand-sage:   #748C7F;

  --black:     #111111;
  --white:     #FAFAFA;
  --grey-50:   #F5F5F2;
  --grey-200:  #DDDDD9;
  --grey-300:  #BEBEBB;
  --grey-400:  #9A9A97;
  --grey-500:  #6A6A67;
  --grey-600:  #454542;

  --nav-h: 56px;
  --cta-h: 48px;
  --transition-duration: 380ms;
  --transition-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow: hidden; height: 100%; -webkit-text-size-adjust: 100%; }
body {
  overflow: hidden;
  height: 100dvh;
  font-family: 'Satoshi', -apple-system, sans-serif;
  font-weight: 400;
  color: var(--brand-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Progress Bar --- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--brand-sage);
  z-index: 100;
  transition: width 380ms var(--transition-ease);
  will-change: width;
}

/* --- Deck Container --- */
.deck {
  position: fixed;
  inset: 0;
  bottom: var(--nav-h);
  overflow: hidden;
}

body.has-persistent-cta .deck {
  bottom: calc(var(--nav-h) + var(--cta-h));
}

/* --- Cards --- */
.card {
  position: absolute;
  inset: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  opacity: 0;
  transition: transform var(--transition-duration) var(--transition-ease),
              opacity var(--transition-duration) var(--transition-ease);
  will-change: transform, opacity;
}

.card.is-active {
  transform: translateX(0);
  opacity: 1;
}

.card.is-exiting-left {
  transform: translateX(-60px);
  opacity: 0;
}

.card.is-exiting-right {
  transform: translateX(60px);
  opacity: 0;
}

/* --- Card Themes (two-colour system) --- */
.card--white  { background: var(--white); color: var(--brand-dark); }
.card--light  { background: var(--grey-50); color: var(--brand-dark); }
.card--forest { background: var(--brand-dark); color: var(--white); }
.card--final  { background: var(--brand-dark); color: var(--white); }

/* --- Card Body --- */
.card-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.5rem, 6vw, 3rem);
}

/* Centre vertically (logo cover) */
.card-body--center {
  justify-content: center;
}

/* Content starts ~33% down the card for breathing room.
   Uses a ::before pseudo-element sized to 30% of the flex container
   so the position is relative to card height, not width. */
.card-body--third {
  justify-content: flex-start;
}

.card-body--third::before {
  content: '';
  flex: 0 0 30%;
}

/* --- Typography --- */
h1 {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 9vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  color: var(--brand-dark);
}

h2 {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

h3 {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 2.8vw, 1.125rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

p {
  font-family: 'Satoshi', sans-serif;
  font-weight: 400;
  font-size: clamp(0.875rem, 2.5vw, 1.0625rem);
  line-height: 1.6;
  color: var(--grey-600);
}

/* Dark card text */
.card--forest p,
.card--final p {
  color: rgba(255,255,255,0.8);
}

.card--forest h1,
.card--final h1,
.card--forest h2,
.card--final h2,
.card--forest h3,
.card--final h3 {
  color: var(--white);
}

/* Bold emphasis within paragraphs */
p strong {
  font-weight: 700;
  color: var(--brand-dark);
}

.card--forest p strong,
.card--final p strong {
  color: var(--white);
  font-weight: 700;
}

/* --- Labels (section markers — need to pop) --- */
.label {
  display: inline-block;
  font-family: 'Satoshi', sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-sage);
  margin-bottom: 1.25rem;
}

.card--forest .label,
.card--final .label {
  color: rgba(255,255,255,0.85);
}

/* --- Parent label (e.g. SERVICES) --- */
.label-parent {
  display: block;
  font-family: 'Satoshi', sans-serif;
  font-weight: 600;
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--grey-400);
  margin-bottom: 0.35rem;
}

.card--forest .label-parent {
  color: rgba(255,255,255,0.35);
}

/* --- Sub-heading (service card title below label) --- */
.sub-heading {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.125rem, 3.5vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--brand-dark);
  margin-bottom: 0.75rem;
}

.card--forest .sub-heading {
  color: var(--white);
}

/* (Services compact layout removed — now uses standard diff-stack with card-body--third) */

/* --- Location line --- */
.location {
  font-family: 'Satoshi', sans-serif;
  font-weight: 400;
  font-size: clamp(0.875rem, 2.5vw, 1.0625rem);
  color: var(--brand-sage);
  margin-top: 0.15rem;
}

/* --- Cover Card (logo) --- */
.cover-logo {
  display: block;
  width: clamp(260px, 65vw, 420px);
  height: auto;
  margin: 0 auto;
}

/* Ensure cover card body centres the image properly */
.card-body--center {
  align-items: center;
}

/* --- Specialisation statement (slide 3) --- */
.spec-statement {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 400;
  font-size: clamp(1.375rem, 4.5vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--white);
}

.spec-statement strong {
  font-weight: 700;
  color: var(--white);
}

.spec-statement em {
  font-style: italic;
  color: rgba(255,255,255,0.9);
}

/* --- Service body text (cards 4-6) — slightly larger for real estate --- */
.service-body {
  font-family: 'Satoshi', sans-serif;
  font-weight: 400;
  font-size: clamp(0.9375rem, 2.8vw, 1.125rem);
  line-height: 1.65;
  color: var(--grey-500);
}

.service-body strong {
  font-weight: 700;
  color: var(--brand-dark);
}

.card--forest .service-body {
  color: rgba(255,255,255,0.8);
}

.card--forest .service-body strong {
  color: var(--white);
}

/* --- Differentiation Stack (Why Antipodean) --- */
.diff-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 0.25rem;
}

.diff-item {
  border-left: 2px solid var(--brand-sage);
  padding-left: 1rem;
}

.diff-item h3 {
  margin-bottom: 0.2rem;
  font-size: clamp(1rem, 2.8vw, 1.125rem);
}

.diff-item p {
  font-size: clamp(0.875rem, 2.4vw, 1rem);
  line-height: 1.55;
  color: var(--grey-500);
}

.card--forest .diff-item p,
.card--final .diff-item p {
  color: rgba(255,255,255,0.8);
}

/* --- Resource / Link Buttons --- */
.link-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  font-family: 'Satoshi', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--brand-dark);
  background: transparent;
  border: 1.5px solid var(--brand-sage);
  border-radius: 6px;
  padding: 0.85rem 1.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, transform 150ms ease;
  max-width: 280px;
}

.link-btn:hover {
  background: rgba(46, 64, 52, 0.05);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
}

.card--forest .link-btn {
  color: var(--white);
  border-color: var(--brand-sage);
}

.card--forest .link-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--white);
}

/* --- CTA Button --- */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Satoshi', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--white);
  background: var(--brand-dark);
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  margin-top: 1.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms ease, transform 150ms ease;
}

.cta-btn:hover {
  background: var(--brand-sage);
  transform: translateY(-1px);
}

.card--forest .cta-btn,
.card--final .cta-btn {
  background: transparent;
  border: 1.5px solid var(--brand-sage);
  color: var(--white);
}

.card--forest .cta-btn:hover,
.card--final .cta-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--white);
}

/* --- Email Capture (Subscribe card) --- */
.email-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  max-width: 400px;
}

.form-fields {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 0.5rem;
}

.email-input {
  flex: 1;
  font-family: 'Satoshi', sans-serif;
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--white);
  background: rgba(255,255,255,0.08);
  border: 1.5px solid var(--brand-sage);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 200ms ease, background 200ms ease;
}

.email-input::placeholder {
  color: var(--brand-sage);
}

.email-input:focus {
  border-color: var(--white);
  background: rgba(255,255,255,0.12);
}

.email-submit {
  font-family: 'Satoshi', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--brand-dark);
  background: var(--white);
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: background 200ms ease, transform 150ms ease;
  white-space: nowrap;
}

.email-submit:hover {
  background: var(--brand-sage);
  color: var(--white);
  transform: translateY(-1px);
}

.email-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-msg {
  font-family: 'Satoshi', sans-serif;
  font-size: 0.8125rem;
  margin-top: 0.5rem;
  color: rgba(255,255,255,0.7);
}

.form-msg.is-hidden {
  display: none;
}

.form-msg.is-error {
  color: #f5a3a3;
}

/* --- Persistent CTA Strip --- */
.persistent-cta {
  position: fixed;
  bottom: var(--nav-h);
  left: 0;
  right: 0;
  height: var(--cta-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-dark);
  z-index: 50;
  transition: opacity 300ms ease, transform 300ms ease;
}

.persistent-cta a {
  font-family: 'Satoshi', sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.persistent-cta a:hover {
  opacity: 0.85;
}

.persistent-cta.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

/* Invert CTA strip on dark cards: white bg, green text */
body.theme--dark .persistent-cta {
  background: var(--white);
}

body.theme--dark .persistent-cta a {
  color: var(--brand-dark);
}

/* --- Legal Links (inside bottom nav) --- */
.legal-links {
  font-family: 'Satoshi', sans-serif;
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--grey-400);
  margin-top: 2px;
}

.legal-links a {
  color: var(--grey-400);
  text-decoration: none;
  transition: color 200ms ease;
}

.legal-links a:hover {
  color: var(--brand-sage);
}

body.theme--dark .legal-links,
body.theme--dark .legal-links a {
  color: rgba(255,255,255,0.25);
}

body.theme--dark .legal-links a:hover {
  color: rgba(255,255,255,0.5);
}

.nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
}

/* --- Bottom Nav --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: var(--white);
  border-top: 1px solid var(--grey-200);
  z-index: 90;
  transition: background 300ms ease, border-color 300ms ease;
}

body.theme--dark .bottom-nav {
  background: var(--brand-dark);
  border-top-color: rgba(255,255,255,0.1);
}

.nav-btn {
  font-family: 'Satoshi', sans-serif;
  font-size: 1.5rem;
  font-weight: 300;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--grey-200);
  border-radius: 50%;
  color: var(--grey-500);
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn:hover {
  color: var(--brand-dark);
  border-color: var(--brand-sage);
}

body.theme--dark .nav-btn {
  color: rgba(255,255,255,0.5);
  border-color: rgba(255,255,255,0.15);
}

body.theme--dark .nav-btn:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}

/* --- Dots --- */
.dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  max-width: 100%;
  justify-content: center;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 4px;
  background: var(--grey-300);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 300ms var(--transition-ease);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.dot.is-active {
  width: 22px;
  background: var(--brand-dark);
}

body.theme--dark .dot {
  background: rgba(255,255,255,0.2);
}

body.theme--dark .dot.is-active {
  background: var(--brand-sage);
}

/* --- Responsive --- */
@media (max-height: 600px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.35rem; }
  .card-body { padding: 1.5rem 1.25rem; }
  .card-body--third::before { flex: 0 0 18%; }
  .diff-stack { gap: 0.75rem; }
  .label { margin-bottom: 0.75rem; }
  .service-body { font-size: 0.85rem; }
  .spec-statement { font-size: 1.2rem; }
  .email-form { flex-direction: column; }
  .form-fields { flex-direction: column; }
}

@media (max-width: 380px) {
  .card-body { padding: 1.5rem 1.25rem; }
  .card-body--third::before { flex: 0 0 22%; }
  h2 { font-size: 1.35rem; }
  .service-body { font-size: 0.85rem; line-height: 1.55; }
  .email-form { flex-direction: column; }
  .form-fields { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .progress-bar, .dot, .nav-btn, .cta-btn, .persistent-cta, .link-btn {
    transition: none !important;
  }
}
