/* =========================================================
   Calibrated Computares — Theme Tokens + Base Styles
   Light default, Dark via [data-theme="dark"]
   ========================================================= */

:root {
  /* Typography */
  --font-body: ui-rounded, "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Fraunces", ui-serif, Georgia, serif;

  /* Radii */
  --radius: 14px;
  --radius-sm: 10px;

  /* Light mode palette */
  --bg: #f6f1e8;
  --surface: #fffaf3;
  --surface-2: #efebe4;
  --text: #1f2328;
  --muted-text: #4f5962;
  --border: #d8d2c9;

  --accent: #2f8f8b;
  --accent-strong: #257b77;
  --link: var(--accent);

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* Dark mode tokens */
:root[data-theme="dark"] {
  --bg: #0f1718;
  --surface: #131f21;
  --surface-2: #111a1b;
  --text: #e8ecec;
  --muted-text: #b8c2c3;
  --border: #213133;

  --accent: #3bb7b2;
  --accent-strong: #2aa6a1;
  --link: #66d2ce;
  --accent-2: #6b5bd6;

  --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.28);
}

/* OS default dark if user prefers dark AND no explicit theme set */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0f1718;
    --surface: #131f21;
    --surface-2: #111a1b;
    --text: #e8ecec;
    --muted-text: #b8c2c3;
    --border: #213133;

    --accent: #3bb7b2;
    --accent-strong: #2aa6a1;
    --link: #66d2ce;
    --accent-2: #6b5bd6;

    --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.28);
  }
}

/* =========================================================
   Base Reset + Layout
   ========================================================= */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  letter-spacing: 0.1px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px;
}

main.container {
  padding-top: 26px;
  padding-bottom: 34px;
}

/* =========================================================
   Typography
   ========================================================= */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  margin: 0 0 10px;
  line-height: 1.15;
  letter-spacing: 0.2px;
}

p {
  margin: 0 0 12px;
}

.muted {
  color: var(--muted-text);
}

/* =========================================================
   Links
   ========================================================= */
a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================================================
   Cards
   ========================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* =========================================================
   Forms + Inputs
   ========================================================= */
.form-grid {
  display: grid;
  gap: 10px;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.textarea {
  resize: vertical;
}

/* =========================================================
   Rating Stars
   ========================================================= */
.stars {
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: #d4b05f;
  text-shadow: 0 0 6px rgba(212, 176, 95, 0.25);
}

/* =========================================================
   Buttons
   ========================================================= */
button {
  font: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: none;
}

button:hover {
  border-color: color-mix(in srgb, var(--border), var(--text) 15%);
}

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

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.btn-link:hover {
  border-color: color-mix(in srgb, var(--border), var(--text) 15%);
  text-decoration: none;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px 32px;
}

.header-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

/* LEFT */
.header-left {
  display: flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
}

.brand-logo {
  height: 140px;
  width: auto;
  display: block;
  flex-shrink: 0;
  margin-top: 4px;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 8px rgba(59, 183, 178, 0.22));
}

.brand-text {
  color: var(--text);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* CENTER */
.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  min-width: 0;
}

.header-center a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.header-center a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* RIGHT */
.header-right {
  display: flex;
  align-items: center;
  justify-self: end;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
  white-space: nowrap;
}

.nav-user {
  color: var(--muted-text);
  font-size: 0.95rem;
  white-space: nowrap;
}

.admin-link {
  font-weight: 600;
  color: var(--accent);
}

.nav-logout {
  margin: 0;
  display: inline-flex;
}

.nav-logout button {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}

.nav-logout button:hover {
  color: var(--accent);
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.theme-toggle .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 75%);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  margin-top: 80px;
  padding-top: 40px;
  position: relative;
}

.site-footer::before {
  content: "";
  display: block;
  height: 1px;
  width: 100%;
  margin-bottom: 40px;

  background: linear-gradient(90deg,
      transparent,
      var(--accent),
      transparent);

  opacity: 0.4;
}

.footer-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-left p {
  margin: 0 0 10px;
  color: var(--text);
}

.footer-left a {
  color: var(--link);
}

.footer-right h3 {
  margin-bottom: 12px;
}

.footer-form {
  display: grid;
  gap: 12px;
}

.footer-form-row {
  display: block;
}

.footer-form .input,
.footer-form .textarea {
  background: var(--surface);
}

.footer-form button {
  min-width: 140px;
}

/* =========================================================
   Accessibility
   ========================================================= */
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), var(--accent-2, #000) 25%);
  outline-offset: 2px;
  border-radius: 10px;
}

/* =========================================================
   Home Page
   ========================================================= */
.home-brand {
  text-align: center;
  margin-top: 26px;
  margin-bottom: 26px;
}

.home-brand::after {
  content: "";
  display: block;
  width: 120px;
  height: 3px;
  margin: 10px auto 0;

  background: linear-gradient(90deg,
      rgba(110, 84, 148, 0.15),
      rgba(39, 162, 163, 0.8),
      rgba(110, 84, 148, 0.15));

  border-radius: 999px;
}

.home-brand h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  margin-bottom: 6px;
  letter-spacing: 0.6px;
}

.brand-tagline {
  color: var(--muted-text);
  font-size: 1rem;
  letter-spacing: 0.4px;
  margin-bottom: 26px;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
  align-items: stretch;
}

.hero.card {
  background: var(--surface);
}

.hero p {
  color: var(--muted-text);
  font-size: 1.05rem;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 140%;

  background:
    radial-gradient(circle at 20% 40%,
      color-mix(in srgb, var(--accent), transparent 75%),
      transparent 60%),
    radial-gradient(circle at 80% 20%,
      color-mix(in srgb, var(--accent-2, #6b5bd6), transparent 75%),
      transparent 60%);

  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.hero>* {
  position: relative;
  z-index: 1;
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.review-grid {
  display: grid;
  gap: 12px;
}

.review-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.review-title {
  margin-top: 6px;
  font-family: var(--font-heading);
}

.review-meta {
  color: var(--muted-text);
  font-size: 0.95rem;
}

.review-body {
  margin-top: 10px;
}

/* Split sections */
.split-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.split-image-first .split-media {
  order: 1;
}

.split-image-first .split-content {
  order: 2;
}

.split-text-first .split-content {
  order: 1;
}

.split-text-first .split-media {
  order: 2;
}

.split-content h2,
.split-content h3 {
  margin-top: 0;
}

.split-media {
  width: 100%;
  max-width: 380px;
  /* ADD THIS */
  aspect-ratio: 1 / 1;

  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  margin: 0 auto;

  border-radius: 18px;
  background: #0f1b24;

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.35),
    inset 0 0 20px rgba(0, 255, 255, 0.05);
}

.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.portrait-media img.profile-photo {
  object-fit: cover;
  object-position: center 25%;
}

/* Circuit divider */
.tech-divider {
  height: 110px;
  margin: 22px 0 6px;
  background-image: url("/img/circuit-divider.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 18px;
  opacity: 0.85;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right,
      transparent 0%,
      black 10%,
      black 90%,
      transparent 100%);
  mask-image: linear-gradient(to right,
      transparent 0%,
      black 10%,
      black 90%,
      transparent 100%);
}

/* Homepage service cards */
.service-card .service-image {
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
}

.service-card .service-image img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.service-card {
  padding-top: 28px;
}

/* =========================================================
   Services Page
   ========================================================= */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.service-tile {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}

.service-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 0;
  margin-bottom: 8px;
}

.service-media img {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: contain;
}

.service-content h2 {
  margin-top: 4px;
}

.service-content p {
  color: var(--muted-text);
}

.service-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.service-price {
  color: var(--text);
}

/* Logged-in service tiers + add-ons */
.service-tier h3,
.addon-card h3 {
  margin-top: 6px;
}

.service-media-lg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  margin-bottom: 10px;
}

.service-media-lg img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.25));
}

.price-range {
  margin-top: 8px;
  font-weight: 700;
}

.service-tier .btn-link.btn-primary {
  margin-top: 10px;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.addon-icon {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 6px;
}

.section-divider {
  height: 110px;
  margin: 22px 0 6px;
  background-image: url("/img/circuit-divider.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 18px;
  opacity: 0.85;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right,
      transparent 0%,
      black 10%,
      black 90%,
      transparent 100%);
  mask-image: linear-gradient(to right,
      transparent 0%,
      black 10%,
      black 90%,
      transparent 100%);
}

/* =========================================================
   Trust Builder
   ========================================================= */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.trust-item h3 {
  margin-bottom: 6px;
}

.trust-item p {
  color: var(--muted-text);
}

/* =========================================================
   Contact Page
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.contact-info {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.contact-info p {
  margin-bottom: 12px;
}

.contact-side {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  height: 100%;
}

.contact-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 20px;
}

.contact-photo-img {
  width: 100%;
  max-width: 380px;
  max-height: 320px;
  height: auto;
  border-radius: var(--radius);
  display: block;
  object-fit: cover;
}

.contact-form {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.contact-socials {
  margin-top: 18px;
}

.contact-socials h3 {
  margin-bottom: 10px;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-links a {
  color: var(--link);
  text-decoration: none;
}

.social-links a:hover {
  text-decoration: underline;
}

.success {
  background: color-mix(in srgb, var(--accent), white 85%);
  border: 1px solid var(--accent);
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.error-box {
  background: #ffefef;
  border: 1px solid #e06b6b;
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.error-box p:last-child,
.success:last-child {
  margin-bottom: 0;
}

/* =========================================================
   Admin
   ========================================================= */
.admin-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .brand-logo {
    height: 84px;
  }

  .brand-text {
    font-size: 1.3rem;
  }

  .header-center {
    gap: 22px;
  }

  .header-right {
    gap: 12px;
  }
}

@media (max-width: 860px) {
  .split-section {
    grid-template-columns: 1fr;
  }

  .split-image-first .split-media,
  .split-image-first .split-content,
  .split-text-first .split-content,
  .split-text-first .split-media {
    order: unset;
  }

  .split-media img,
  .portrait-media img.profile-photo {
    height: 260px;
  }

  .tech-divider {
    height: 72px;
    margin: 18px 0 4px;
    border-radius: 14px;
  }
}

@media (max-width: 760px) {
  .container {
    padding: 14px;
  }

  .header-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .header-left,
  .header-center,
  .header-right {
    justify-self: start;
  }

  .header-center,
  .header-right {
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }

  .brand-logo {
    height: 64px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .footer-container {
    padding: 20px 14px;
  }

  .footer-grid,
  .home-grid,
  .offer-grid,
  .service-grid,
  .addon-grid,
  .trust-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-side {
    grid-template-rows: auto auto;
  }

  .contact-photo {
    min-height: 180px;
  }

  .contact-photo-img {
    max-width: 100%;
    max-height: none;
  }
}