/*
 * Zabarvan CyberPunk - About & Contact Dossier Pages
 * Aesthetic: Classified Megacorp Dossier, Tactical Transmissions
 * Scoped to [data-theme="cyberpunk"] :is(.cp-page-about, .cp-page-contact). All rules unlayered.
 */

/* ---------- 1. Frame & Grid Architecture ---------- */
@media (min-width: 1024px) {
  [data-theme="cyberpunk"] .cp-page.cp-page-about,
  [data-theme="cyberpunk"] .cp-page.cp-page-contact {
    padding-left: 0;
  }

  [data-theme="cyberpunk"] .cp-page-about > section,
  [data-theme="cyberpunk"] .cp-page-contact > section {
    padding-left: clamp(24px, 4vw, 64px);
    padding-right: clamp(24px, 4vw, 64px);
  }
}

[data-theme="cyberpunk"] .cp-page-about > section,
[data-theme="cyberpunk"] .cp-page-contact > section {
  background-color: #030508;
  position: relative;
}

[data-theme="cyberpunk"] .cp-page-about > section + section,
[data-theme="cyberpunk"] .cp-page-contact > section + section {
  border-top: 1px solid rgba(0, 240, 255, 0.2);
}

/* Section Headings: Orbitron with Laser Ticks */
[data-theme="cyberpunk"] .cp-page-about > section h2 {
  font-family: var(--font-orbitron), sans-serif !important;
  font-size: clamp(26px, 2.9vw, 40px);
  line-height: 1.05;
  letter-spacing: 0.05em;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
  overflow-wrap: break-word;
}

[data-theme="cyberpunk"] .cp-page-about > section h2::before,
[data-theme="cyberpunk"] .cp-page-contact .cp-contact-body h3::before {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-bottom: 20px;
  background: var(--cp-yellow);
  box-shadow: 0 0 10px var(--cp-yellow);
}

[data-theme="cyberpunk"] .cp-page-contact .cp-contact-body h3 {
  font-family: var(--font-orbitron), sans-serif !important;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #FFFFFF;
}

/* ---------- 2. About & Contact Hero ---------- */
[data-theme="cyberpunk"] :is(.cp-page-about .cp-about-hero, .cp-page-contact .cp-contact-hero) {
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  row-gap: 40px;
  padding-top: 120px;
  padding-bottom: 64px;
}

@media (min-width: 1024px) {
  [data-theme="cyberpunk"] :is(.cp-page-about .cp-about-hero, .cp-page-contact .cp-contact-hero) {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    column-gap: 64px;
    padding-top: 150px;
    padding-bottom: 96px;
  }
}

/* Hero Media: Tactical Chamfer & Cyan Wireframe */
[data-theme="cyberpunk"] :is(.cp-page-about, .cp-page-contact) .cp-hero-media {
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
  border: 1px solid var(--cp-cyan);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.25);
}

[data-theme="cyberpunk"] :is(.cp-page-about, .cp-page-contact) .cp-hero-media img {
  border-radius: 0px !important;
  filter: contrast(1.12) saturate(1.05);
}

/* ---------- 3. Heritage & Mission Dossier Grid ---------- */
/* Only the text columns of each section get the dossier frame: a grid child that starts with a heading.
   Image columns and footer cells stay unframed. */
[data-theme="cyberpunk"] .cp-page-about > section .grid > div:has(> h2) {
  background: #070B14;
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 32px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
  position: relative;
}

[data-theme="cyberpunk"] .cp-page-about > section .grid > div:has(> h2)::before {
  content: "// DOSSIER_LOG";
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--cp-cyan);
  letter-spacing: 0.2em;
  opacity: 0.75;
}

/* ---------- 4. Contact Terminal Form ---------- */
[data-theme="cyberpunk"] .cp-page-contact form {
  background: #070B14;
  border: 1px solid rgba(0, 240, 255, 0.25);
  padding: 36px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), inset 0 0 25px rgba(0, 240, 255, 0.04);
}

[data-theme="cyberpunk"] .cp-page-contact form input,
[data-theme="cyberpunk"] .cp-page-contact form textarea {
  background: #04070D !important;
  border: 1px solid rgba(0, 240, 255, 0.25) !important;
  color: #EDF2F7 !important;
  font-family: var(--font-mono) !important;
}

[data-theme="cyberpunk"] .cp-page-contact form input:focus,
[data-theme="cyberpunk"] .cp-page-contact form textarea:focus {
  border-color: var(--cp-cyan) !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.4) !important;
}

[data-theme="cyberpunk"] .cp-page-contact form button[type="submit"] {
  background: var(--cp-yellow) !important;
  color: #030508 !important;
  font-family: var(--font-orbitron) !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)) !important;
  box-shadow: 0 0 20px rgba(var(--cp-yellow-rgb), 0.5) !important;
  border: none !important;
  transition: all 0.2s ease;
}

[data-theme="cyberpunk"] .cp-page-contact form button[type="submit"]:hover {
  background: var(--cp-cyan) !important;
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.7) !important;
}

/* ---------- 5. About Polish ---------- */

/* Observations: hairline rows instead of a box inside a box */
[data-theme="cyberpunk"] .cp-page-about .cp-obs-item {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.15) !important;
  clip-path: none !important;
  box-shadow: none !important;
  padding: 14px 0 16px;
}

[data-theme="cyberpunk"] .cp-page-about .cp-obs-item:last-child {
  border-bottom-color: transparent !important;
}

/* Founder: the yellow highlight quote needs breathing room around its text */
[data-theme="cyberpunk"] .cp-page-about .cp-quotes .cp-tile {
  padding: 18px 24px;
}

/* Founder heading is a larger display title than the section headings */
[data-theme="cyberpunk"] .cp-page-about .cp-founder-body h2 {
  font-size: clamp(30px, 4.6vw, 56px);
}

/* ---------- 6. Page Heroes: Declassified File (About) & Comms Terminal (Contact) ---------- */

/* About: centred stage. The name is filled with the mountain photo, framed by a HUD border,
   with a scanline overlay and a meta strip along the base. Nothing sits on the left. */
[data-theme="cyberpunk"] .cp-hx-about {
  min-height: clamp(620px, 92vh, 980px);
  padding: 120px 24px 120px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(0, 240, 255, 0.10), transparent 60%),
    #030508;
}

[data-theme="cyberpunk"] .cp-hx-about::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
}

[data-theme="cyberpunk"] .cp-hx-about .cp-hx-shade {
  background:
    linear-gradient(180deg, rgba(3, 5, 8, 0.6) 0%, rgba(3, 5, 8, 0.1) 30%, rgba(3, 5, 8, 0.1) 70%, #030508 100%);
}

/* Top edge sits below the fixed navbar so the frame and its top bracket are never hidden under it */
[data-theme="cyberpunk"] .cp-hx-frame {
  position: absolute;
  inset: 112px 20px 28px;
  z-index: 2;
  border: 1px solid rgba(0, 240, 255, 0.18);
  pointer-events: none;
}

[data-theme="cyberpunk"] .cp-hx-frame::before,
[data-theme="cyberpunk"] .cp-hx-frame::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--cp-cyan);
}

[data-theme="cyberpunk"] .cp-hx-frame::before {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
}

[data-theme="cyberpunk"] .cp-hx-frame::after {
  right: -2px;
  bottom: -2px;
  border-left: 0;
  border-top: 0;
}

[data-theme="cyberpunk"] .cp-hx-about-stage {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1400px;
}

[data-theme="cyberpunk"] .cp-hx-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--cp-yellow);
}

[data-theme="cyberpunk"] .cp-hx-eyebrow::before,
[data-theme="cyberpunk"] .cp-hx-eyebrow::after {
  content: "";
  width: 56px;
  height: 1px;
  background: var(--cp-yellow);
  box-shadow: 0 0 8px var(--cp-yellow);
}

/* The wordmark: each letter is a window onto the mountain photo */
[data-theme="cyberpunk"] .cp-hx-wordmark {
  display: block;
  margin-top: 18px;
  font-family: var(--font-orbitron), sans-serif;
  font-size: clamp(2.5rem, 10vw, 11rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  background-image: url("/images/about_hero_mountain.png");
  background-size: cover;
  background-position: center 35%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 28px rgba(0, 240, 255, 0.28));
}

[data-theme="cyberpunk"] .cp-hx-tagline {
  max-width: 38rem;
  margin: 32px auto 0;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.7;
  color: #CBD5E0;
  text-wrap: balance;
}

[data-theme="cyberpunk"] .cp-hx-tagline strong {
  font-weight: 800;
  color: var(--cp-yellow);
}

[data-theme="cyberpunk"] .cp-hx-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(160, 174, 192, 0.9);
}

[data-theme="cyberpunk"] .cp-hx-meta span {
  padding: 4px 26px;
}

[data-theme="cyberpunk"] .cp-hx-meta span + span {
  border-left: 1px solid rgba(0, 240, 255, 0.35);
}

@media (max-width: 640px) {
  [data-theme="cyberpunk"] .cp-hx-about {
    padding: 104px 16px 120px;
  }

  [data-theme="cyberpunk"] .cp-hx-frame {
    inset: 100px 12px 20px;
  }

  [data-theme="cyberpunk"] .cp-hx-meta span {
    padding: 4px 12px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }
}

/* Contact: a comms-terminal panel beside the headline; its lines type out on load */
[data-theme="cyberpunk"] .cp-hx-contact {
  min-height: clamp(520px, 72vh, 760px);
}

[data-theme="cyberpunk"] .cp-hx-terminal {
  flex-shrink: 0;
  width: min(460px, 100%);
  background: rgba(3, 5, 8, 0.82);
  border: 1px solid rgba(0, 240, 255, 0.45);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.15);
  backdrop-filter: blur(6px);
}

[data-theme="cyberpunk"] .cp-hx-term-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cp-cyan);
}

[data-theme="cyberpunk"] .cp-hx-term-secure {
  color: var(--cp-yellow);
}

[data-theme="cyberpunk"] .cp-hx-term-body {
  padding: 20px 18px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  color: #A7F3FF;
}

[data-theme="cyberpunk"] .cp-hx-type {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: cp-hx-type 1.2s steps(var(--cp-hx-chars)) forwards;
}

@keyframes cp-hx-type {
  to { width: 100%; }
}

[data-theme="cyberpunk"] .cp-hx-caret::after {
  content: "_";
  color: var(--cp-yellow);
  animation: cp-hx-blink 1s steps(1) infinite;
}

@keyframes cp-hx-blink {
  50% { opacity: 0; }
}

/* Contact form: the card already frames the form, so drop the form's own frame (it doubled the border) */
[data-theme="cyberpunk"] .cp-page-contact .cp-contact-form form {
  background: none;
  border: 0;
  padding: 0;
  clip-path: none;
  box-shadow: none;
}
