/* Technology4Life, site styles v2
   Self-contained: no frameworks, no web fonts, no JavaScript, no tracking. */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1c1f24;
  --muted: #5d6470;
  --border: #e3e6eb;
  --brand: #3a6fd8;        /* links, primary buttons */
  --brand-dark: #2654b0;
  --accent: #e5484d;       /* YouTube-ish red */
  --accent-dark: #c4343a;
  --amazon: #ffa41c;       /* affiliate buttons */
  --amazon-dark: #f08c00;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid rgba(58, 111, 216, .45); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: .3em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; min-height: 60px; padding-top: .5rem; padding-bottom: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.nav li + li { margin-top: 0; }
.nav a { display: block; padding: .4rem .75rem; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a[aria-current="page"] { color: var(--brand); background: rgba(58, 111, 216, .08); }

/* Sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section + .section { padding-top: 0; }
.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 5fr 7fr; } }
.lead { font-size: clamp(1.075rem, 1.6vw, 1.2rem); color: var(--muted); }
.eyebrow { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .75rem; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .7rem 1.2rem; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-youtube { background: var(--accent); color: #fff; }
.btn-youtube:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: #c9ced6; color: var(--text); }
.btn-amazon { background: var(--amazon); color: #111; }
.btn-amazon:hover { background: var(--amazon-dark); color: #111; }
.btn-sm { padding: .5rem .85rem; font-size: .9rem; border-radius: 8px; }
.btn .ext { font-size: .85em; opacity: .8; }

/* Responsive 16:9 YouTube embed */
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@supports not (aspect-ratio: 16 / 9) { .video { height: 0; padding-top: 56.25%; } }

/* Panels and cards */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow); }
.cta-panel { display: grid; gap: 1rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cta-panel { grid-template-columns: 1fr auto; } }
.cta-panel h2 { margin-bottom: .3em; }
.cta-panel p { margin: 0; color: var(--muted); }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,24,40,.06), 0 10px 28px rgba(16,24,40,.10); }
.card-media { display: block; aspect-ratio: 16 / 9; background: #e9ecf1; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem 1.2rem 1.25rem; flex: 1; }
.card-title { font-size: 1.12rem; margin: 0; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--brand); }
.card-text { color: var(--muted); font-size: .97rem; margin: 0; }
.card-product { font-size: .9rem; font-weight: 600; margin: .25rem 0 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .6rem; }

.summary-list { display: grid; gap: 1rem; }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.summary h3 { margin-bottom: .35em; }
.summary p { color: var(--muted); }
.summary .card-actions { padding-top: .25rem; }

/* Article (gear note) */
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2.75rem); box-shadow: var(--shadow); }
.article h2 { margin-top: 1.6em; }
.article h2:first-child { margin-top: 0; }
.article h3 { margin-top: 1.3em; }
.article .video { margin: 0 0 2rem; }
.product-box { margin-top: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); padding: 1.1rem 1.25rem; }
.product-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.product-row + .product-row { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.product-name { font-weight: 700; margin: 0; }
.product-name .tag { font-weight: 600; font-size: .8rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .05rem .5rem; margin-left: .4rem; vertical-align: middle; }
.todo { background: #fff2a8; padding: 0 .25rem; border-radius: 3px; }

/* Disclosure and footer */
.disclosure { margin-top: 2rem; padding: 1rem 1.25rem; border-radius: var(--radius); background: #eef2f8; color: var(--muted); font-size: .92rem; }
.disclosure p { margin: 0; }
.disclosure p + p { margin-top: .35rem; }
.footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .92rem; margin-top: 2rem; }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--brand); text-decoration: underline; }

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .topbar .container { justify-content: center; }
  .actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .btn:hover, .card:hover { transform: none; }
}

/* Subscribe line under videos, related notes, home recent list */
.video-follow { margin: .75rem 0 0; color: var(--muted); font-size: .95rem; }
.article .video { margin: 0 0 0; }
.article .video-follow { margin: .75rem 0 1.5rem; }
.related { margin-top: 2rem; }
.related ul { margin-bottom: 0; }
.note-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.note-list li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); }
.note-list li + li { margin-top: .75rem; }
.note-list a { font-weight: 700; text-decoration: none; color: var(--text); }
.note-list a:hover { color: var(--brand); }
.note-list p { margin: .35rem 0 0; color: var(--muted); font-size: .97rem; }
