/* Base */
:root {
  --bg: #0b0b0c;
  --panel: #121214;
  --panel-2: #161619;
  --text: #f6f7f9;
  --muted: #b6bac2;
  --primary: #10b981; /* green */
  --primary-700: #059669;
  --ring: rgba(16, 185, 129, 0.35);
  --border: #25262b;
}

/* Light theme */
:root[data-theme="light"] {
  --bg: #ffffff;
  --panel: #f6f7fb;
  --panel-2: #eef0f6;
  --text: #0f1523;
  --muted: #4b5565;
  --primary: #10b981;
  --primary-700: #059669;
  --ring: rgba(16, 185, 129, 0.2);
  --border: #d8dbe3;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, #23181d 0%, transparent 60%),
    var(--bg);
  line-height: 1.6;
}

:root[data-theme="light"] body {
  background: var(--bg);
}

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 11, 12, 0.8);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: none;
}
:root[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.8);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #ff6b8c);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.brand-lines h1 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}
.brand-lines p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* Brand logo image */
.brand .logo-img {
  height: 36px;
  width: auto;
  display: block;
}
@media (max-width: 640px) {
  .brand .logo-img {
    height: 30px;
  }
}

/* Brand text logo */
.brand-title {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-gordon {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.3px;
}
.brand-irvine {
  font-family: "Great Vibes", cursive;
  font-size: 22px;
  margin-top: 2px;
}
@media (max-width: 640px) {
  .brand-gordon {
    font-size: 16px;
  }
  .brand-irvine {
    font-size: 20px;
  }
}

.nav {
  display: flex;
  gap: 16px;
}
.nav a {
  padding: 8px 10px;
  border-radius: 8px;
}
.nav a:hover {
  background: var(--panel);
  text-decoration: none;
}

/* theme toggle */
#themeToggle {
  min-width: 64px;
}

/* theme toggle slider */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.theme-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.theme-toggle .switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.theme-toggle .track {
  width: 44px;
  height: 24px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}
.theme-toggle .thumb {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translate(0, -50%);
  transition: transform 0.2s ease;
}
:root[data-theme="light"] .theme-toggle .thumb {
  background: #fff;
}
:root[data-theme="light"] .theme-toggle .track {
  background: #e9ecf4;
}
.theme-toggle input:checked + .switch .track {
  background: linear-gradient(135deg, var(--primary), #34d399);
  border-color: var(--primary);
}
.theme-toggle input:checked + .switch .thumb {
  transform: translate(20px, -50%);
}

@media (hover: none) and (pointer: coarse) {
  .theme-toggle .track {
    width: 52px;
    height: 28px;
  }
  .theme-toggle .thumb {
    width: 22px;
    height: 22px;
  }
}

/* Hero */
.section {
  padding: 72px 0;
}
.hero {
  padding-top: 56px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
}
.hero-copy h2,
.hero-copy h1 {
  font-size: 36px;
  line-height: 1.2;
  margin: 0 0 12px;
}
.hero-copy p {
  color: var(--muted);
  margin: 0 0 20px;
}
.cta-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap; /* allow wrapping to avoid squashing */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 44px;
  padding: 0 16px;
  font-weight: 600;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.04s ease;
}
.btn:hover {
  background: var(--panel-2);
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  border-radius: 999px; /* pill shape */
}
.btn-primary:hover {
  background: var(--primary-700);
  border-color: var(--primary-700);
}
.btn-ghost {
  background: transparent;
}
.btn.small {
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.contact-snippet {
  display: flex;
  gap: 10px;
  color: var(--muted);
  align-items: center;
}
.contact-snippet a {
  color: var(--muted);
}
.contact-snippet a:hover {
  color: var(--text);
}

.hero-media .video-frame {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}
.hero-media iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* Features */
.features {
  padding: 26px 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.feature h3 {
  margin: 0 0 4px;
}
.feature p {
  margin: 0;
  color: var(--muted);
}

/* Services */
.services {
  padding: 36px 0;
}
.services h2,
.services h3 {
  margin: 0 0 12px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.service h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.service p {
  margin: 0;
  color: var(--muted);
}

/* Contact */
.contact {
  padding: 36px 0 56px;
}
.contact-sub {
  color: var(--muted);
  margin-top: 4px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}
.contact-card {
  height: fit-content;
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-list li {
  margin-bottom: 8px;
}
.contact-list a {
  color: var(--text);
  text-decoration: none;
}
.contact-list a:hover {
  text-decoration: underline;
}

.form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.form .form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form label {
  font-size: 14px;
  color: var(--muted);
}
.form input,
.form textarea,
.form select {
  background: #0e0e11;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
:root[data-theme="light"] .form input,
:root[data-theme="light"] .form textarea,
:root[data-theme="light"] .form select {
  background: #ffffff;
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}
.fineprint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #0c0c0e;
  padding: 24px 0;
}
:root[data-theme="light"] .site-footer {
  background: #f6f7fb;
}
/* add a bit more side padding within footer containers */
.site-footer .container {
  padding-left: 80px;
  padding-right: 80px;
}
@media (max-width: 1024px) {
  .site-footer .container {
    padding-left: 48px;
    padding-right: 48px;
  }
}
@media (max-width: 640px) {
  .site-footer .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.muted {
  color: var(--muted);
}

/* Rich footer */
.rich-footer .footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 28px 0 8px;
}
.footer-col h4 {
  margin: 0 0 10px;
  font-size: 16px;
}
.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-col li {
  margin: 6px 0;
}
.footer-col a {
  color: var(--text);
  text-decoration: none;
}
.footer-col a:hover {
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}
.footer-links {
  display: flex;
  gap: 12px;
}

/* Utility bar */
.utility-bar {
  background: rgba(11, 11, 12, 0.8); /* match header */
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: none;
  padding-top: 12px; /* Add space at the top for buttons */
}
:root[data-theme="light"] .utility-bar {
  background: rgba(255, 255, 255, 0.8); /* match light header */
}
.util-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}
.util-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Alerts */
.alert {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
}
.alert.success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-inner,
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
  .rich-footer .footer-columns {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 56px;
  }
  .hero-copy h1,
  .hero-copy h2 {
    font-size: 28px;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .rich-footer .footer-columns {
    grid-template-columns: 1fr;
  }
  /* stack CTAs on small screens */
  .cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .cta-row .btn {
    width: 100%;
  }
}

/* Responsive nav improvements */
/* Header/nav adjustments */
.menu {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-left: auto; /* push menu to the far right */
  justify-content: flex-end; /* align items to right within menu */
}

/* Prevent squashing: allow scroll on narrow screens */
@media (max-width: 820px) {
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .menu {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
  }
  .menu::-webkit-scrollbar {
    display: none;
  }
  .menu a {
    display: inline-flex;
  }
}

/* specifically offset first footer column (Contact) from the edge) */
.rich-footer .footer-columns .footer-col:first-child {
  padding-left: 24px;
}
@media (min-width: 1025px) {
  .rich-footer .footer-columns .footer-col:first-child {
    padding-left: 48px;
  }
}
@media (max-width: 640px) {
  .rich-footer .footer-columns .footer-col:first-child {
    padding-left: 12px;
  }
}

@media (max-width: 640px) {
  /* ensure footer columns have breathing room on mobile */
  .rich-footer .footer-columns {
    padding-left: 16px;
    padding-right: 16px;
  }
  .rich-footer .footer-columns .footer-col {
    padding-left: 8px;
    padding-right: 8px;
  }
}
