/* ============================================================
   PNA Electronics and Communications — company site
   Dark tech aesthetic · cyan/teal accent
   ============================================================ */

:root {
  --bg: #0b0f14;
  --bg-elevated: #111821;
  --bg-card: #151d28;
  --bg-alt: #0e141c;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #e8eef6;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-strong: #06b6d4;
  --accent-glow: rgba(34, 211, 238, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --header-h: 72px;
  --container: 1100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #67e8f9;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #041016;
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.accent {
  color: var(--accent);
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
}

.section__lead {
  max-width: 38rem;
  margin-top: -0.25rem;
  margin-bottom: 2.25rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(11, 15, 20, 0.78);
  border-bottom: 1px solid var(--border);
}

.nav {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__logo {
  font-weight: 700;
  font-size: clamp(0.85rem, 3.6vw, 1.1rem);
  line-height: 1.2;
  max-width: 75%;
  color: var(--text);
  letter-spacing: -0.03em;
}

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

.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.4rem;
}

.nav__menu a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0;
}

.nav__menu a:hover,
.nav__menu a:focus-visible {
  color: var(--text);
}

.nav__cta {
  padding: 0.45rem 0.95rem !important;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
  background: var(--accent-soft);
}

.nav__cta:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.nav__toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: -30% auto auto -10%;
  width: 70vw;
  height: 70vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
}

.hero__layout {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 46rem;
}

.hero__content h1 {
  margin-bottom: 0.5rem;
}

.hero__tagline {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #041016;
  box-shadow: 0 8px 28px rgba(34, 211, 238, 0.28);
}

.btn--primary:hover {
  color: #041016;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.4);
}

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

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

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero__meta li {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

/* ---------- About / What we do ---------- */

.about__intro {
  max-width: 40rem;
}

.about__panels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.about__panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

.about__panel:hover {
  border-color: rgba(34, 211, 238, 0.35);
  transform: translateY(-2px);
}

.about__panel h3 {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
}

.about__panel p {
  margin: 0;
  font-size: 0.92rem;
}

/* ---------- Skills ---------- */

.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

.skill-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
  transform: translateY(-2px);
}

.skill-card__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1rem;
}

.skill-card__icon svg {
  width: 22px;
  height: 22px;
}

.skill-card h3 {
  margin-bottom: 0.45rem;
}

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

/* ---------- Projects ---------- */

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: border-color 0.2s, transform 0.2s var(--ease);
  min-height: 280px;
}

.project-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
  transform: translateY(-2px);
}

.project-card__badge {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.project-card__icon {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(34, 211, 238, 0.16), rgba(15, 23, 32, 0.9));
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.06);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.project-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.project-card__icon-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--accent);
  z-index: 0;
}

.project-card__icon:not(.is-fallback) .project-card__icon-fallback {
  /* keep as underlay while image loads; hide once image paints over */
  opacity: 1;
}

.project-card__icon.is-fallback .project-card__icon-fallback {
  opacity: 1;
}

.project-card__desc {
  flex: 1;
}

.project-card h3 {
  margin: 0.2rem 0 0;
}

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

.store-status {
  margin-top: 0.5rem;
  display: inline-flex;
  pointer-events: none;
  user-select: none;
}

.store-status__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.store-status__badge svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.store-status__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.25;
}

.store-status__text strong {
  font-weight: 600;
  color: var(--text);
  font-size: 0.8rem;
}

.store-status__sub {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.9;
}

/* ---------- Services ---------- */

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.45rem;
  transition: border-color 0.2s;
}

.service-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
}

.service-card__num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.85rem;
}

.service-card h3 {
  margin-bottom: 0.5rem;
}

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

/* ---------- Contact ---------- */

.contact__wrap {
  text-align: center;
  max-width: 720px;
}

.contact__wrap .section__lead {
  margin-inline: auto;
}

.contact__links {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.contact-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1.1rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.contact-link:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: var(--bg-elevated);
  color: var(--text);
}

.contact-link__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-link__value {
  font-weight: 500;
  color: var(--text-muted);
  word-break: break-all;
}

.contact-link:hover .contact-link__value {
  color: var(--text);
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.footer__inner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.footer__inner a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .about__panels {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects__grid,
  .services__grid {
    grid-template-columns: 1fr;
  }

  .skills__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .about__panels {
    grid-template-columns: 1fr;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(11, 15, 20, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.25s;
  }

  .nav__menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__menu a {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .nav__cta {
    margin-top: 0.5rem;
    text-align: center;
    justify-content: center;
  }

  .contact-link {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 721px) and (max-width: 900px) {
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects__grid .project-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Privacy pages ---------- */

.privacy-page__inner {
  max-width: 720px;
}

.privacy-page .eyebrow a {
  color: var(--accent);
}

.privacy-doc h1 {
  margin-bottom: 0.35rem;
}

.privacy-doc .date {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.privacy-doc h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
  margin-bottom: 0.65rem;
}

.privacy-doc p,
.privacy-doc li {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.privacy-doc ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 1em;
}

.privacy-doc li {
  margin-bottom: 0.4rem;
}

.privacy-doc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Project card privacy link */
.project-card__meta {
  margin: 0;
  font-size: 0.85rem;
}

.project-card__meta a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-card__meta a:hover {
  color: var(--accent);
}

/* iOS-style rounded icon corners (already 16px; reinforce) */
.project-card__icon {
  border-radius: 22.37%; /* classic iOS squircle-ish ratio for 72px ≈ 16px; keep 16px look */
  border-radius: 16px;
}

.project-card__icon picture {
  display: contents;
}

/* Footer links row */
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.footer__links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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