/* ================================================================
   Function Key — Main Stylesheet
   Theme:  functionkey-child (child of Bloksy)
   File:   wp-content/themes/functionkey-child/assets/css/main.css

   TABLE OF CONTENTS
   ─────────────────────────────────────────────────────────────────
    1.  Design Tokens          ← change colours & sizes here
    2.  Base Reset
    3.  Hero — Background & Content
    4.  Floating Header
    5.  Cards — Shell & Layout
    6.  Card Body — Shared Styles
    7.  Work Card — Project Covers & Detail
    8.  Why Us Card
    9.  Reviews Card
   10.  Contact Card
   11.  Remote Support & Client Portal Cards
   12.  Tab Bar
   13.  Responsive (≥ 700 px)
   14.  Reduced Motion
   15.  Parent Theme Overrides  ← Bloksy !important fixes (do not remove)
   ================================================================ */


/* ────────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   Edit these variables to restyle the whole site at once.
   ──────────────────────────────────────────────────────────────── */
:root {
  /* ── Accent colours ─────────────────────────────────────────── */
  --blue: #3f83bf;   /* Primary  — buttons, links, icons, active tab */
  --gold: #a9863f;   /* Secondary — star ratings, Why Us icons       */

  /* ── Text ───────────────────────────────────────────────────── */
  --white: #ffffff;  /* Primary text                                 */
  --gray:  #8e8e93;  /* Muted / secondary text                       */

  /* ── Backgrounds ────────────────────────────────────────────── */
  --bg:          #000000;                   /* Page background       */
  --glass:       rgba(30, 30, 32, 0.55);   /* Card — half-open      */
  --glass-solid: rgba(28, 28, 30, 0.96);   /* Card — full-open      */
  --sep:         rgba(255, 255, 255, 0.08);/* Divider lines         */

  /* ── Layout ─────────────────────────────────────────────────── */
  --card-radius: 20px;
  --header-h:    56px;
  --tab-h:       82px;
  --tab-clear:   calc(var(--tab-h) + 24px);

  /* ── Typography ─────────────────────────────────────────────── */
  --font:    'Inter', system-ui, -apple-system, sans-serif;
  --display: 'Exo', 'Inter', system-ui, sans-serif;

  /* ── Safe area (notch / home indicator) ─────────────────────── */
  --safe-t: env(safe-area-inset-top,    0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}


/* ────────────────────────────────────────────────────────────────
   2. BASE RESET
   ──────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}


/* ────────────────────────────────────────────────────────────────
   3. HERO — BACKGROUND & CONTENT
   ──────────────────────────────────────────────────────────────── */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.scene video,
.scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.scene .dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

.hero-content {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  transition: opacity .5s ease, transform .5s ease;
}
.hero-content.pushed {
  opacity: 0;
  transform: scale(.94);
  pointer-events: none;
}

.hero-logo {
  width: min(420px, 80vw);
  height: auto;
  color: var(--white);
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.5));
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background .2s, transform .15s;
}
.hero-btn:hover  { background: rgba(255, 255, 255, 0.2); }
.hero-btn:active { transform: scale(.96); }
.hero-btn svg    { width: 18px; height: 18px; flex-shrink: 0; }


/* ────────────────────────────────────────────────────────────────
   4. FLOATING HEADER
   ──────────────────────────────────────────────────────────────── */
.float-header {
  position: fixed;
  top: calc(8px + var(--safe-t));
  left: 10px;
  right: 10px;
  height: var(--header-h);
  z-index: 60;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 22, 24, 0.65);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(-20px) scale(.96);
  pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}
.float-header.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.float-header .hdr-logo {
  width: 146px;
  height: auto;
  color: var(--white);
}


/* ────────────────────────────────────────────────────────────────
   5. CARDS — SHELL & LAYOUT
   ──────────────────────────────────────────────────────────────── */
.card {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(8px + var(--safe-b));
  z-index: 40;
  border-radius: var(--card-radius);
  max-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  touch-action: none;
  will-change: max-height;
  transition: max-height .45s cubic-bezier(.32, .72, .24, 1),
              background .3s,
              backdrop-filter .3s;
}
.card.half {
  max-height: calc(48vh + var(--tab-h));
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}
.card.full {
  max-height: calc(var(--actual-vh, 100vh) - var(--header-h) - var(--safe-t) - var(--safe-b) - 24px);
  background: var(--glass-solid);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}

.card .handle {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  margin: 8px auto 0;
  flex-shrink: 0;
}

.card .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 6px;
  flex-shrink: 0;
}
.card .card-head h2 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--white);
}
.card .card-head .close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: var(--gray);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 600;
}
.card .card-head .close-btn:hover { background: rgba(255, 255, 255, 0.2); }

.card .card-body {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 0 20px var(--tab-clear);
  overscroll-behavior: contain;
}
.card .card-body::-webkit-scrollbar { display: none; }


/* ────────────────────────────────────────────────────────────────
   6. CARD BODY — SHARED STYLES
   ──────────────────────────────────────────────────────────────── */
.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 18px 0 8px;
}

.card-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sep);
}
.card-item:last-child { border-bottom: none; }

.card-item .item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.card-item .item-icon svg   { width: 22px; height: 22px; color: var(--blue); }
.card-item .item-info       { flex: 1; min-width: 0; }
.card-item .item-info h3    { font-weight: 600; font-size: 15px; letter-spacing: -.01em; color: var(--white); }
.card-item .item-info p     { font-size: 13px; color: var(--gray); line-height: 1.4; margin-top: 2px; }
.card-item .item-meta       { font-size: 13px; color: var(--gray); flex-shrink: 0; }
.card-item .item-chevron    { color: rgba(255, 255, 255, 0.2); font-size: 13px; flex-shrink: 0; margin-left: 4px; }

#card-about .card-item .item-icon,
.scope-item .item-icon,
[id^="card-project-"] .card-item .item-icon     { width: auto; height: auto; background: none; border-radius: 0; }
#card-about .card-item .item-icon svg,
.scope-item .item-icon svg,
[id^="card-project-"] .card-item .item-icon svg { width: 23px; height: 23px; color: var(--blue); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.stat-box {
  text-align: center;
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}
.stat-box .n {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  color: var(--blue);
}
.stat-box .l {
  font-size: 11px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 2px;
}


/* ────────────────────────────────────────────────────────────────
   7. WORK CARD — PROJECT COVERS & DETAIL
   ──────────────────────────────────────────────────────────────── */
.proj-card {
  border-radius: 14px;
  overflow: hidden;
  margin: 10px 0;
  position: relative;
  cursor: pointer;
  transition: transform .15s;
  min-height: 160px;                     /* visible even without a hero image */
  background: rgba(255, 255, 255, 0.06); /* fallback when no image is set     */
}
.proj-card:active { transform: scale(.98); }

.proj-card img {
  width: 100%;
  display: block;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.proj-card .proj-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  border-radius: 0 0 14px 14px;
}
.proj-card .proj-label h3 { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--white); }
.proj-card .proj-label p  { font-size: 12px; color: var(--gray); }

/* Chevron arrow */
.proj-card::after {
  content: '›';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Project detail hero image */
.project-hero { margin: 0 -20px 16px; }
.project-hero img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  min-height: 220px;
}

/* Back button */
.back-projects-btn {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.back-projects-btn:hover { background: rgba(255, 255, 255, 0.14); }


/* ────────────────────────────────────────────────────────────────
   8. WHY US CARD
   ──────────────────────────────────────────────────────────────── */
.why-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--sep);
}
.why-item:last-child { border-bottom: none; }

.why-item h3 {
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.why-item h3 svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; }
.why-item p      { font-size: 13px; color: var(--gray); line-height: 1.5; }


/* ────────────────────────────────────────────────────────────────
   9. REVIEWS CARD
   ──────────────────────────────────────────────────────────────── */
.review-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--sep);
}
.review-card:last-child { border-bottom: none; }

.review-card .stars {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.review-card blockquote {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  font-style: normal;
  margin-bottom: 10px;
  /* reset any blockquote styling from the parent theme */
  border-left: none;
  padding-left: 0;
  margin-left: 0;
  background: none;
}

.review-who         { display: flex; align-items: center; gap: 10px; }
.review-who img     { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.review-who .nm     { font-weight: 600; font-size: 14px; color: var(--white); }
.review-who .role   { font-size: 12px; color: var(--gray); }


/* ────────────────────────────────────────────────────────────────
   10. CONTACT CARD
   ──────────────────────────────────────────────────────────────── */
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sep);
}
.contact-row:last-child  { border-bottom: none; }
.contact-row svg         { width: 22px; height: 22px; color: var(--blue); flex-shrink: 0; }
.contact-row a           { color: var(--white); text-decoration: none; font-weight: 500; }
.contact-row a:hover     { color: var(--blue); }
.contact-row span        { color: var(--white); font-weight: 500; }
.contact-row .sub        { font-size: 12px; color: var(--gray); }

.social-row              { display: flex; gap: 18px; align-items: center; margin-top: 8px; padding-bottom: 4px; }
.social-link             { color: var(--blue); text-decoration: none; display: inline-flex; transition: opacity .2s; }
.social-link:hover       { opacity: .7; }
.social-link svg         { width: 23px; height: 23px; display: block; color: inherit; }


/* ────────────────────────────────────────────────────────────────
   11. REMOTE SUPPORT & CLIENT PORTAL CARDS
   ──────────────────────────────────────────────────────────────── */
.support-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--sep);
}
.support-section:last-child { border-bottom: none; }

.support-section h3 {
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.support-section h3 svg { width: 18px; height: 18px; color: var(--blue); }

.support-code {
  font-family: ui-monospace, monospace;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: center;
  color: var(--white);
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  margin: 8px 0;
  user-select: all;
}
.support-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  margin: 8px auto;
  width: 100%;
  transition: background .2s;
}
.support-copy:hover  { background: rgba(255, 255, 255, 0.14); }
.support-copy:active { transform: scale(.97); }

.dl-btn {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin: 8px 0;
  transition: opacity .2s;
}
.dl-btn:hover { opacity: .9; }

.portal-link {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  margin: 12px 0;
}
.portal-link:hover { opacity: .9; }


/* ────────────────────────────────────────────────────────────────
   12. TAB BAR
   ──────────────────────────────────────────────────────────────── */
.tab-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(8px + var(--safe-b));
  z-index: 70;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 10px 0;
  border-radius: 20px;
  background: rgba(22, 22, 24, 0.65);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.tab-bar::after { display: none; }

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--gray);
  padding: 4px 12px;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  transition: color .2s;
  -webkit-tap-highlight-color: transparent;
}
.tab svg        { width: 24px; height: 24px; transition: color .2s; }
.tab.active     { color: var(--blue); }
.tab.active svg { color: var(--blue); }


/* ────────────────────────────────────────────────────────────────
   13. RESPONSIVE  (≥ 700 px — centred layout)
   ──────────────────────────────────────────────────────────────── */
@media (min-width: 700px) {
  .tab-bar {
    max-width: 580px;
    left: 50%;
    right: auto;
    width: 580px;
    transform: translateX(-50%);
  }
  .card {
    max-width: 580px;
    left: 50%;
    right: auto;
    width: 580px;
    transform: translateX(-50%);
  }
  .float-header {
    max-width: 580px;
    left: 50%;
    right: auto;
    width: 580px;
    transform: translateX(-50%) translateY(-20px) scale(.96);
  }
  .float-header.visible {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}


/* ────────────────────────────────────────────────────────────────
   14. REDUCED MOTION
   ──────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .card,
  .float-header,
  .hero-content { transition-duration: .01s; }
}


/* ────────────────────────────────────────────────────────────────
   15. PARENT THEME OVERRIDES  (Bloksy)
   The Bloksy parent theme sets heading and element colours with
   high specificity. These !important rules enforce our design
   tokens against those overrides. Do not remove without testing.
   ──────────────────────────────────────────────────────────────── */

/* Headings inside cards */
.card .card-head h2       { color: var(--white) !important; }
.card-item .item-info h3  { color: var(--white) !important; }
.proj-card .proj-label h3 { color: var(--white) !important; }
.why-item h3              { color: var(--white) !important; }
.why-item h3 svg          { color: var(--gold)  !important; }
.support-section h3       { color: var(--white) !important; }

/* Other text elements */
.support-code             { color: var(--white) !important; }
.review-who .nm           { color: var(--white) !important; }
.contact-row span         { color: var(--white) !important; }

/* Blockquote — strip the parent theme's left-border style */
.review-card blockquote {
  border-left:  none !important;
  padding-left: 0    !important;
  margin-left:  0    !important;
  background:   none !important;
}
