/* BIOMED REWIRED - homepage: hero, topic tiles, panels, responsive and polish rules */
/* ---------- Hero ---------- */

@media (min-width: 1481px) { main { border-inline: 1px solid rgba(40,200,255,.18); } }
.hero { position: relative; height: 290px; overflow: hidden; border-bottom: 1px solid var(--line); background: #06142a; }
.hero-photos { position: absolute; top: 0; right: 0; height: 100%; width: 75%; display: grid; grid-template-columns: .85fr 1.4fr; gap: 3px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%); mask-image: linear-gradient(90deg, transparent 0, #000 12%); }
.hero-photos img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.hero-photos img + img { object-position: center center; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,10,24,.94) 0%, rgba(3,10,24,.78) 24%, rgba(3,10,24,0) 46%); }
.hero-inner { position: relative; height: 100%; padding: 12px 0 0 38px; max-width: 520px; }
.kicker { font-size: .92rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); margin-bottom: 4px; }
.kicker i { font-style: normal; color: #fff; margin: 0 10px; }
.hero h1 { font-size: 3.1rem; font-weight: 800; line-height: .98; letter-spacing: -.02em; }
.hero h1 span { color: var(--cyan); }
.lede { margin: 8px 0 12px; font-size: .88rem; line-height: 1.25; color: #fff; font-weight: 500; max-width: 38ch; }
.hero-actions { display: flex; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; padding: 8px 18px; border-radius: 7px; transition: filter .15s; }
.btn:hover { filter: brightness(1.12); }
.btn-cyan { background: var(--cyan); color: #04202a; }
.btn-outline { border: 1.5px solid rgba(255,255,255,.85); background: rgba(3,10,24,.45); font-weight: 600; }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; padding: 14px 16px 10px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 124px; padding: 10px 6px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 -20px 30px rgba(0,0,0,.18), 0 0 14px rgba(25,211,240,.25); transition: transform .15s, filter .15s; }
.tile:hover { transform: translateY(-3px); filter: brightness(1.1); }
.tile .ic { width: 34px; height: 34px; margin-bottom: 4px; }
.tile b { font-size: 1.02rem; line-height: 1.08; font-weight: 700; margin-bottom: 5px; }
.tile span { font-size: .7rem; line-height: 1.22; opacity: .93; }
.t-blue { background: linear-gradient(170deg, #2260d8, #0f3a91); }
.t-green { background: linear-gradient(170deg, #25ad4d, #0f6c33); }
.t-orange { background: linear-gradient(170deg, #ec7b18, #a24a08); }
.t-purple { background: linear-gradient(170deg, #8a43e6, #4f1d95); }
.t-gold { background: linear-gradient(170deg, #dca90f, #946c04); }
.t-teal { background: linear-gradient(170deg, #17b6a6, #0a6e6a); }
.t-red { background: linear-gradient(170deg, #de3340, #8c1220); }
.t-navy { background: linear-gradient(170deg, #2a63b8, #10336a); }

/* ---------- Rows & panels ---------- */
.row { display: grid; gap: 10px; padding: 0 16px 10px; }
.rowA { grid-template-columns: 1fr 1.72fr 1fr; }
.rowA .panel { display: flex; flex-direction: column; }
.rowA .feat { flex: 1; }
.rowA .fcard img { flex: 1; height: auto; min-height: 118px; }
.rowB { grid-template-columns: 1fr 1.02fr 1fr; }
.panel { background: linear-gradient(180deg, rgba(12,34,68,.92), rgba(7,20,42,.94)); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: 0 0 16px rgba(25,211,240,.22), inset 0 0 22px rgba(25,211,240,.06); min-width: 0; }
.panel h2 { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; }
.panel h2 > .ic { color: var(--cyan); width: 24px; height: 24px; }
.viewall { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; color: var(--cyan); }

/* progress */

/* featured */
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fcard { display: flex; flex-direction: column; background: #fff; color: var(--ink); border-radius: 8px; overflow: hidden; transition: transform .15s; }
.fcard:hover { transform: translateY(-3px); }
.fcard img { width: 100%; height: 118px; object-fit: cover; }
.fcard b { padding: 5px 9px 3px; font-size: .95rem; line-height: 1.08; font-weight: 700; }
.fcard span { display: flex; align-items: center; gap: 6px; padding: 0 9px 8px; font-size: .78rem; font-weight: 600; }
.fcard em { font-style: normal; white-space: nowrap; }

/* start here */
.startbox { background: #fff; color: var(--ink); border-radius: 8px; overflow: hidden; }
.startbox img { width: 100%; height: 84px; object-fit: cover; }
.startbox a { display: flex; align-items: center; gap: 9px; padding: 3px 10px; border-top: 1px solid #e2e9f4; }
.startbox a:hover { background: #eef5ff; }
.startbox a > .ic:first-child { width: 22px; height: 22px; color: #1a62d4; }
.startbox a span { flex: 1; min-width: 0; }
.startbox b { display: block; font-size: .8rem; line-height: 1.1; }
.startbox small { font-size: .66rem; color: #4b5d7a; }

/* row B */
.ohmbox, .sketchbox, .calbox { background: #fff; color: var(--ink); border-radius: 8px; padding: 8px 10px; }
.ohm-top { display: flex; align-items: center; gap: 12px; justify-content: center; }
.formula { display: flex; align-items: center; gap: 8px; font-family: Georgia, serif; font-weight: 700; font-size: 1.5rem; border: 2px solid var(--ink); border-radius: 5px; padding: 3px 14px; }
.frac { display: inline-flex; flex-direction: column; text-align: center; font-size: 1.15rem; line-height: 1.05; }
.frac i:first-child { border-bottom: 2px solid var(--ink); padding: 0 8px 1px; }
.circuit { width: 110px; height: 56px; }
.legend { font-size: .8rem; line-height: 1.25; margin: 2px 0 6px; }
.btn-cyan2 { display: inline-flex; align-items: center; gap: 8px; justify-content: center; background: #11a8c0; color: #fff; border: 0; border-radius: 6px; padding: 6px 14px; font-weight: 600; font-size: .85rem; }
.btn-cyan2:hover { filter: brightness(1.12); }
.ohmbox { position: relative; min-height: 124px; }
.ohmbox .btn-cyan2 { right: 10px; bottom: 8px; }
.cal-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cal-top ol { counter-reset: s; display: grid; gap: 1px; font-size: .74rem; line-height: 1.2; }
.cal-top li { counter-increment: s; display: flex; align-items: center; gap: 6px; }
.cal-top li::before { content: counter(s); width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 1.5px solid #12a9bd; color: #12a9bd; font-size: .6rem; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.clipboard { width: 52px; height: 68px; flex-shrink: 0; }

/* strip & footer */
.strip { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 18px; margin: 4px 16px 0; padding: 12px 12px; border-top: 1px solid rgba(255,255,255,.35); border-bottom: 1px solid rgba(255,255,255,.35); background: rgba(5,16,34,.7); }
.strip div { display: flex; align-items: center; gap: 10px; }
.strip .ic { width: 34px; height: 34px; color: #fff; stroke-width: 1.4; }
.strip b { display: block; font-size: .92rem; }
.strip small { font-size: .72rem; color: #d6e2f5; }
.site-footer { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 12px 38px 30px; font-size: .85rem; }
.site-footer a { text-decoration: underline; }
.site-footer i { width: 1px; height: 16px; background: rgba(255,255,255,.5); }
/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .rowA, .rowB { grid-template-columns: 1fr 1fr; }
  .rowA #featured { grid-column: 1 / -1; order: -1; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { padding-left: 24px; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: 8px 14px; gap: 10px; }
  .search { order: 5; width: 100%; margin: 0; flex: 1 1 100%; }
  .menu-btn { display: block; }
  .mainnav { display: none; flex-direction: column; align-items: stretch; }
  .mainnav.open { display: flex; }
  .hero { height: auto; min-height: 340px; }
  .hero h1 { font-size: 2.6rem; }
  .hero-shade { background: linear-gradient(0deg, rgba(3,10,24,.92), rgba(3,10,24,.55)); }
  .hero-inner { padding: 22px 18px; max-width: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .rowA, .rowB, .feat { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; }
  .site-footer { justify-content: center; padding-inline: 16px; }
  .ohm-top { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- Polish ---------- */
.hero { height: 330px; }
.hero-inner { padding-top: 26px; }
.hero h1 { font-size: 3.4rem; text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.hero h1 span { text-shadow: 0 0 26px rgba(25,211,240,.5); }
.lede { font-size: .95rem; }
.hero-photos { gap: 0; }
.hero-photos img + img { border-left: 2px solid rgba(25,211,240,.55); box-shadow: -8px 0 24px rgba(0,0,0,.35); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(0deg, rgba(4,11,26,.85), transparent); pointer-events: none; }
.btn { box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.btn-cyan { box-shadow: 0 4px 18px rgba(25,211,240,.4); }

.tiles { gap: 12px; padding-top: 18px; padding-bottom: 14px; }
.tile { min-height: 132px; position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0 0 55% 0; background: linear-gradient(180deg, rgba(255,255,255,.22), transparent); pointer-events: none; }
.tile .ic { width: 40px; height: 40px; margin-bottom: 6px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.tile b { font-size: 1.06rem; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.tile:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 10px 26px rgba(25,211,240,.4); }

.row { gap: 12px; padding-bottom: 12px; }
.panel { box-shadow: 0 0 22px rgba(25,211,240,.26), inset 0 0 26px rgba(25,211,240,.07), 0 10px 30px rgba(0,0,0,.35); }
.panel h2 { padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid rgba(40,200,255,.22); }
.fcard, .startbox, .ohmbox, .sketchbox, .calbox { box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.fcard:hover { box-shadow: 0 12px 28px rgba(25,211,240,.35); }

.btn-cyan2, .btn-panel { box-shadow: 0 3px 12px rgba(25,211,240,.3); }
.strip .ic { color: var(--cyan); }
.strip { background: linear-gradient(180deg, rgba(10,28,58,.8), rgba(5,16,34,.8)); border-radius: 10px; border: 1px solid rgba(40,200,255,.25); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-inner, .tile, .panel, .strip { animation: rise .6s ease both; }
.tile:nth-child(2) { animation-delay: .04s; } .tile:nth-child(3) { animation-delay: .08s; } .tile:nth-child(4) { animation-delay: .12s; }
.tile:nth-child(5) { animation-delay: .16s; } .tile:nth-child(6) { animation-delay: .2s; } .tile:nth-child(7) { animation-delay: .24s; } .tile:nth-child(8) { animation-delay: .28s; }
@media (max-width: 760px) { .hero { height: auto; min-height: 380px; } .hero-photos { width: 100%; opacity: .55; } .hero::after { display: none; } .hero-inner { padding-top: 22px; } }
@media (prefers-reduced-motion: reduce) { .hero-inner, .tile, .panel, .strip { animation: none; } }

/* ---------- Dashboard preview and device preview (homepage) ---------- */
.dash h2 { flex-wrap: wrap; row-gap: 0; }
.dash .soon { color: var(--cyan); font-weight: 600; font-size: .92rem; }
.dash-lead { font-size: .85rem; color: #d4e2f5; margin-bottom: 10px; }
.dash-preview { display: grid; gap: 6px; }
.dash-preview li { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border: 1px dashed rgba(40,200,255,.35); border-radius: 8px; background: rgba(5,16,34,.5); font-size: .86rem; color: #b9cae4; }
.dash-preview b { color: #6d84a8; font-weight: 600; }
.dash-foot { margin-top: 10px; font-size: .76rem; color: #9fb3d1; }

.dev-preview .dpv { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 8px; padding: 12px 14px 14px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.dpv-art { width: 100%; max-width: 250px; height: auto; background: #0a1c3a; border-radius: 8px; padding: 6px; }
.dpv-text { font-size: .84rem; line-height: 1.4; }
.dev-preview .btn-cyan2 { align-self: center; }
.nf { padding: 56px 16px; }
.nf h1 { font-size: 2rem; margin-bottom: 10px; }
.nf p { color: #d4e2f5; margin-bottom: 18px; }
.btn-cyan2 { text-decoration: none; }
.dpv-new { font-size: .86rem; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.dpv-new a { color: #0b6f85; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.dpv-new .chip { color: #07505f; border-color: #129fb4; background: rgba(18,159,180,.12); }

/* Phone: smaller search placeholder so the full hint fits on one line */
@media (max-width: 600px) {
  .search input { padding-right: 10px; }
  .search input::placeholder { font-size: .72rem; letter-spacing: -.005em; }
}
@media (max-width: 360px) { .search input::placeholder { font-size: .66rem; } }
@media (max-width: 340px) { .search input::placeholder { font-size: .6rem; } }

/* Featured topic cards: icon art (replace with licensed photos later) */
.fart { display: grid; place-items: center; height: 118px; background: radial-gradient(240px 140px at 50% 30%, #1b4a8c, #0a1c3a); color: var(--cyan); }
.rowA .fart { flex: 1; min-height: 118px; }
.fart-ic { width: 54px; height: 54px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* About page */
.about { padding: 28px 16px 56px; }
.about h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 800; letter-spacing: -.01em; margin: 10px 0 18px; }
.about h1:focus { outline: none; }
.about-body { max-width: 72ch; font-size: 1.08rem; line-height: 1.75; color: #e2ecfa; background: rgba(8,22,44,.7); border: 1.5px solid rgba(40,200,255,.25); border-radius: 14px; padding: clamp(18px, 4vw, 34px); }
.about-body p { margin: 0 0 16px; }
.about-body p:last-child { margin-bottom: 0; }
.about-links { margin-top: 22px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
