/* Tech Disruptions NZ — shared styles */

:root {
  --bg: #fff;
  --bg-raised: #f4f6f8;
  --bg-card: #f4f6f8;
  --navy: #0f172a;
  --line: #e2e6eb;
  --line-strong: #c9d0d8;
  --text: #0f172a;
  --text-muted: #3d4f61;
  --accent: #0054c8;
  --accent-deep: #003fa0;
  --accent-soft: rgba(0, 84, 200, 0.08);
  --accent-glow: rgba(0, 84, 200, 0.16);
  --danger: #b91c1c;
  --radius: 14px;
  --header-h: 4.25rem;
  --max: 70rem;
  --font-sans: "IBM Plex Sans", Inter, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 110% -10%, rgba(0, 84, 200, 0.06), transparent 55%),
    radial-gradient(800px 500px at -15% 20%, rgba(0, 84, 200, 0.04), transparent 50%),
    var(--bg);
  background-attachment: fixed;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-deep);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
}

.skip-link:focus {
  top: 0;
  color: var(--bg);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.logo:hover {
  color: var(--text);
}

.logo-mark {
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
}

.logo-text {
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 50%;
  width: 1.1rem;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.nav-toggle-bar {
  top: 50%;
  margin-left: -0.55rem;
  margin-top: -1px;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  margin-left: -0.55rem;
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.nav-toggle-input:focus-visible + .nav-toggle {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav-toggle-input:checked + .nav-toggle .nav-toggle-bar {
  background: transparent;
}

.nav-toggle-input:checked + .nav-toggle .nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle-input:checked + .nav-toggle .nav-toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.45rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--accent-soft);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}

@media (max-width: 48rem) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    padding: 0.5rem 1.25rem 1rem;
  }

  .nav-toggle-input:checked ~ .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .site-nav a {
    padding: 0.75rem 0.85rem;
  }
}

/* Main layout
   ------------------------------------------------------------------ */

.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.page-kicker {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-title {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.lead,
.prose p,
.card p,
.video-card p,
.contact-panel p {
  color: var(--text-muted);
}

.lead {
  max-width: 40rem;
  margin: 0 0 1.75rem;
  font-size: 1.15rem;
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  margin: 2.25rem 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
}

.prose p {
  margin: 0 0 1rem;
}

/* Hero + cards
   ------------------------------------------------------------------ */

.hero {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: end;
    gap: 3rem;
    padding-top: 1.5rem;
  }
}

.hero-panel {
  padding: 1.5rem 1.5rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(0, 84, 200, 0.06), transparent 42%),
    var(--bg-card);
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero-panel p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: #fff;
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.card-grid {
  display: grid;
  gap: 1rem;
  margin: 2.75rem 0 0;
}

@media (min-width: 40rem) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.3rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--accent-deep);
  transform: translateY(-2px);
  color: inherit;
}

.card h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card p {
  margin: 0 0 1rem;
  flex: 1;
  font-size: 0.98rem;
}

.card-link {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Videos
   ------------------------------------------------------------------ */

.video-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 40rem) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.video-card {
  min-width: 0;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 0.9rem;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 45%, var(--accent-soft), transparent 55%),
    var(--bg-card);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.play-icon {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.play-icon::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 0.95rem 0 0 1.15rem;
  border-style: solid;
  border-width: 0.45rem 0 0.45rem 0.75rem;
  border-color: transparent transparent transparent var(--accent);
}

.video-card h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
}

.video-card p {
  margin: 0;
  font-size: 0.95rem;
}

/* Contact + 404
   ------------------------------------------------------------------ */

.contact-panel {
  max-width: 36rem;
  margin-top: 1.5rem;
  padding: 1.5rem 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.contact-panel h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 400;
}

.x-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  font-weight: 600;
  text-decoration: none;
}

.x-link:hover {
  color: var(--accent);
}

.error-page {
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.error-code {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(5rem, 16vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.error-page .page-title {
  margin-top: 0.75rem;
}

.error-page .lead {
  margin-left: auto;
  margin-right: auto;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
}

.footer-inner {
  display: grid;
  gap: 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2rem;
}

.footer-brand {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-nav {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-nav a:hover {
  color: var(--accent);
}

.copyright {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (min-width: 48rem) {
  .footer-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .footer-nav {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
  }
  .card:hover { transform: none; }
}
