/* =============================================================================
   ShackDesk.com — style.css
   Project:  ShackDesk by N4TEK / My Computer Guru LLC
             https://github.com/Computer-Consultant/ShackDesk-Site
   Purpose:  Shared stylesheet for all pages on shackdesk.com.
             All pages link to this file at /style.css.
             Uses CSS custom properties for theming; supports light and dark
             mode automatically via prefers-color-scheme media query.
   Warning:  Do NOT add a BOM or Windows line endings (CRLF) to this file.
   Support:  https://github.com/Computer-Consultant/ShackDesk-Site/issues
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Fonts — self-hosted from /fonts/ folder
   Display: Roboto Condensed (technical, instrument-panel feel)
   Body:    Source Serif 4 (readable, trustworthy, not generic)
   Mono:    JetBrains Mono (callsigns, version numbers, code)

   Why self-hosted: Google Fonts CDN transmits visitor IPs to Google, which
   conflicts with our privacy policy. Self-hosting also improves load
   performance and works on restricted/offline networks. See /fonts/README.md
   for download instructions and font version notes.

   All fonts are licensed under the SIL Open Font License (OFL).
   License files are included in the /fonts/ folder.
   ----------------------------------------------------------------------------- */

@font-face {
  font-family: 'Roboto Condensed';
  src: url('/fonts/roboto-condensed-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto Condensed';
  src: url('/fonts/roboto-condensed-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-latin-300-normal.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* -----------------------------------------------------------------------------
   Design tokens — light mode defaults
   ----------------------------------------------------------------------------- */
:root {
  --bg:           #f5f3ee;
  --bg-card:      #ffffff;
  --bg-panel:     #1a1f2e;
  --surface:      #eae8e2;
  --border:       #d0cdc5;
  --border-strong:#a09d96;

  --text:         #1c1a17;
  --text-muted:   #6b6860;
  --text-inverse: #e8e4dc;
  --text-mono:    #2a5c8f;

  --accent:       #c84b00;
  --accent-hover: #a33b00;
  --accent-soft:  #fff0e8;

  --green:        #2d6e3e;
  --green-soft:   #eaf4ed;
  --amber:        #8a6200;
  --amber-soft:   #fdf6e3;
  --muted-tag:    #6b6860;

  --radius:       6px;
  --radius-lg:    12px;

  --font-display: 'Roboto Condensed', sans-serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --nav-height:   56px;
  --max-width:    860px;
  --gap:          2rem;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #131720;
    --bg-card:      #1c2130;
    --bg-panel:     #0d1017;
    --surface:      #1f2535;
    --border:       #2e3650;
    --border-strong:#4a5470;

    --text:         #ddd9d0;
    --text-muted:   #8892a8;
    --text-inverse: #ddd9d0;
    --text-mono:    #5a9fd4;

    --accent:       #e85d1a;
    --accent-hover: #ff7733;
    --accent-soft:  #2a1a10;

    --green:        #4caf70;
    --green-soft:   #0f2018;
    --amber:        #c89a30;
    --amber-soft:   #1f1800;
    --muted-tag:    #8892a8;
  }
}

/* -----------------------------------------------------------------------------
   Reset & base
   ----------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

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

/* -----------------------------------------------------------------------------
   Navigation
   ----------------------------------------------------------------------------- */
.nav {
  background: var(--bg-panel);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-inverse);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-logo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text-inverse);
  background: rgba(255,255,255,0.07);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--text-inverse);
}

.nav-cta {
  font-family: var(--font-display) !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.35rem 0.9rem !important;
  border-radius: var(--radius) !important;
  transition: background 0.15s !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  color: #fff !important;
  text-decoration: none !important;
}

.nav-sponsor {
  font-family: var(--font-display) !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #c0547a !important;
  border: 1.5px solid #c0547a !important;
  padding: 0.3rem 0.85rem !important;
  border-radius: var(--radius) !important;
  transition: background 0.15s, color 0.15s !important;
}

.nav-sponsor:hover {
  background: #c0547a !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* -----------------------------------------------------------------------------
   Page layout
   ----------------------------------------------------------------------------- */
.page {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  width: 100%;
}

.page-wide {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* -----------------------------------------------------------------------------
   Typography
   ----------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--text);
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem;   letter-spacing: 0.06em; text-transform: uppercase; }

p { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.6;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text-mono);
}

.label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* -----------------------------------------------------------------------------
   Badges / tags
   ----------------------------------------------------------------------------- */
.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 0.4em;
}

.badge-dev {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--amber);
}

.badge-new {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--green);
}

/* -----------------------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.65em 1.4em;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* -----------------------------------------------------------------------------
   Cards
   ----------------------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.card-muted {
  opacity: 0.6;
  filter: grayscale(0.3);
}

/* -----------------------------------------------------------------------------
   Hero (homepage)
   ----------------------------------------------------------------------------- */
.hero {
  background: var(--bg-panel);
  color: var(--text-inverse);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  border-bottom: 3px solid var(--accent);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 39px,
    rgba(255,255,255,0.018) 39px,
    rgba(255,255,255,0.018) 40px
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-callsign {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero h1 {
  font-size: 3rem;
  color: #fff;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.hero .lead {
  color: rgba(255,255,255,0.6);
  max-width: 540px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* -----------------------------------------------------------------------------
   App grid (homepage product list)
   ----------------------------------------------------------------------------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.app-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-decoration: none;
  color: inherit;
}

.app-card.muted {
  opacity: 0.65;
  pointer-events: none;
}

.app-card-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-card-tagline {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mono);
}

.app-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.app-card-link {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* -----------------------------------------------------------------------------
   Section dividers
   ----------------------------------------------------------------------------- */
.section {
  margin-top: 3rem;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

/* -----------------------------------------------------------------------------
   Horizontal rule
   ----------------------------------------------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* -----------------------------------------------------------------------------
   FAQ accordion
   ----------------------------------------------------------------------------- */
.faq-group {
  margin-bottom: 2rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.15s;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--text-muted);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  display: block;
}

/* -----------------------------------------------------------------------------
   Product page hero
   ----------------------------------------------------------------------------- */
.product-hero {
  background: var(--bg-panel);
  color: var(--text-inverse);
  padding: 3rem 1.5rem 2.5rem;
  border-bottom: 3px solid var(--accent);
}

.product-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.product-tagline {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
}

.product-hero h1 {
  font-size: 2.6rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.product-hero .lead {
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin-bottom: 1.75rem;
}

.product-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* -----------------------------------------------------------------------------
   Screenshots
   ----------------------------------------------------------------------------- */
.screenshots {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}

.screenshot {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: block;
}

/* -----------------------------------------------------------------------------
   Screenshot placeholder
   ----------------------------------------------------------------------------- */
.screenshot-placeholder {
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 2rem 0;
}

/* -----------------------------------------------------------------------------
   Feature list
   ----------------------------------------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.feature {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.feature-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* -----------------------------------------------------------------------------
   Footer
   ----------------------------------------------------------------------------- */
.footer {
  background: var(--bg-panel);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 2rem 1.5rem;
  color: rgba(255,255,255,0.35);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  list-style: none;
}

.footer-links a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

/* -----------------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------------- */
@media (max-width: 600px) {
  html { font-size: 16px; }
  h1   { font-size: 1.9rem; }
  .hero h1 { font-size: 2.2rem; }
  .product-hero h1 { font-size: 2rem; }
  .nav-links { display: none; }
  .app-grid  { grid-template-columns: 1fr; }
  .features  { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .hero-actions, .product-actions { flex-direction: column; }
  .btn { justify-content: center; }
}
