@import url('./mh-tokens.css');
@import url('./patterns/site-chrome.css');

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    color: var(--mh-banner-text);
    background: var(--mh-banner-bg);
    font-family: var(--mh-font-body);
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.concept-ribbon {
    padding: .45rem 1rem;
    color: var(--mh-inverse-text);
    background: var(--mh-inverse-bg);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-align: center;
    text-transform: uppercase;
}

main { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.hero {
    position: relative;
    display: grid;
    flex: 1;
    grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr);
    align-items: center;
    min-height: 440px;
    padding: clamp(2.5rem, 5vw, 4.5rem) var(--mh-band-gutter);
    overflow: hidden;
    background:
        linear-gradient(115deg, transparent 0 67%, var(--mh-banner-stripe) 67% 69%, transparent 69%),
        radial-gradient(circle at 75% 40%, var(--mh-banner-glow), transparent 27%);
}
.hero::before {
    content: "MESH";
    position: absolute;
    left: -1vw;
    bottom: -8vw;
    color: var(--mh-banner-stripe);
    font: 700 clamp(9rem, 25vw, 28rem)/.8 var(--mh-font-display);
    letter-spacing: -.09em;
    pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 720px; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 2.2rem; height: 2px; background: currentColor; }
.hero h1 { margin: 1rem 0 1.1rem; max-width:850px; font: 700 clamp(2.8rem, 5.6vw, 5.4rem)/.92 var(--mh-font-display); letter-spacing: -.065em; }
/* Not --mh-cream: in dark mode the banner text is itself cream, so the
   emphasis vanished. --mh-banner-em is whichever colour stands out from the
   banner in the current mode. */
.hero h1 em { color: var(--mh-banner-em); font-style: normal; }
.hero-copy > p { max-width: 660px; margin: 0; font-size: clamp(.96rem, 1.25vw, 1.12rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap:.65rem; margin-top:1.5rem; }
.button { display: inline-flex; padding: .9rem 1.3rem; border: 2px solid var(--mh-banner-text); border-radius: 999px; font-size: .88rem; font-weight: 700; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); box-shadow: 4px 5px 0 var(--mh-banner-shadow); }
.button-dark { color: var(--mh-cream); background: var(--mh-ink); }
.button-light { background: var(--mh-banner-fill); }

.hero-mark { position: relative; display: grid; place-items: center; min-height: 290px; transform:scale(.78); }
.hero-mark img { position: relative; z-index: 2; width: min(260px, 60%); filter: drop-shadow(0 25px 25px var(--mh-logo-shadow)); }
.orbit { position: absolute; border: 1px solid var(--mh-banner-line-strong); border-radius: 50%; }
.orbit-one { width: 360px; height: 360px; }
.orbit-two { width: 500px; height: 500px; }
.signal { position: absolute; z-index: 3; width: 13px; height: 13px; border: 3px solid var(--mh-orange); border-radius: 50%; background: var(--mh-ink); box-shadow: 0 0 0 5px var(--mh-banner-line); }
.signal-one { top: 11%; left: 25%; }
.signal-two { right: 12%; bottom: 26%; }
.signal-three { left: 8%; bottom: 16%; }

.choice-strip { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; border-block: 1px solid var(--mh-banner-line-strong); background: var(--mh-inverse-bg); color: var(--mh-inverse-text); }
.choice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; min-height: 102px; padding: 1.2rem clamp(1rem, 3vw, 2.2rem); border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: filter .2s; }
.choice:hover { filter: brightness(1.1); }
.choice-meshtastic { padding-left: max(clamp(1rem, 3vw, 2.2rem), calc(100% - 600px)); background: var(--mh-choice-meshtastic); box-shadow: inset 0 4px 0 var(--mh-green); }
.choice-meshcore { padding-right: max(clamp(1rem, 3vw, 2.2rem), calc(100% - 600px)); background: var(--mh-choice-meshcore); box-shadow: inset 0 4px 0 var(--mh-blue); }
.choice strong, .choice small { display: block; }
.choice strong { font: 700 1.25rem var(--mh-font-display); }
.choice small { margin-top: .25rem; color: var(--mh-inverse-muted); }
.choice-number { font: 600 .72rem var(--mh-font-display); opacity: .6; }
.choice-arrow { font-size: 1.6rem; }
.choice-centre { display: flex; flex-direction: column; justify-content: center; min-width: 250px; padding: 1rem 2rem; text-align: center; }
.choice-centre span { font-weight: 700; }
.choice-centre small { margin-top: .25rem; color: var(--mh-inverse-muted); }

.common-section { padding: clamp(5rem, 9vw, 9rem) var(--mh-band-gutter); color: var(--mh-text); background: var(--mh-bg); }
.section-heading { display: grid; grid-template-columns: .7fr 1.5fr 1fr; align-items: end; gap: 2rem; }
.section-heading h2 { margin: 0; max-width: 700px; font: 700 clamp(2.2rem, 5vw, 4.7rem)/.98 var(--mh-font-display); letter-spacing: -.055em; }
.section-heading p { margin: 0; line-height: 1.65; color: var(--mh-text-muted); }
.common-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 4rem; border: 1px solid var(--mh-border); background: var(--mh-border); }
.common-card { min-height: 310px; padding: 2rem; background: var(--mh-surface-2); text-decoration: none; transition: background .2s, transform .2s; }
.common-card:hover { position: relative; z-index: 1; background: var(--mh-surface); transform: translateY(-6px); box-shadow: 0 20px 45px var(--mh-shadow-strong); }
.card-index { font: 600 .72rem var(--mh-font-display); color: var(--mh-accent); }
.common-card h3 { margin: 4.5rem 0 .8rem; font: 700 1.7rem var(--mh-font-display); }
.common-card p { min-height: 3.4rem; color: var(--mh-text-muted); line-height: 1.55; }
.common-card b { display: inline-block; margin-top: 1.5rem; font-size: .85rem; }

.manifesto { padding: clamp(5rem, 9vw, 9rem) var(--mh-band-gutter); color: var(--mh-inverse-text); background: var(--mh-inverse-bg); }
.manifesto p { color: var(--mh-orange-pale); font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.manifesto h2 { margin: 1rem 0 2.5rem; font: 700 clamp(2.8rem, 7vw, 7rem)/.92 var(--mh-font-display); letter-spacing: -.06em; }
.manifesto a { color: var(--mh-orange-pale); font-weight: 700; text-decoration: none; }

/* The platform strip sits immediately above this compact, readable footer. */
body > footer {
    align-items: center;
    padding-block: 1.1rem;
    border-top: 0;
    color: var(--mh-banner-text);
    background: var(--mh-banner-bg);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.45;
}
body > footer a,
body > footer .site-links a { color: var(--mh-banner-text); text-decoration: underline; text-underline-offset: .2em; }
body > footer .site-links { margin-left: auto; }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero-mark { min-height: 350px; }
    .choice-strip { grid-template-columns: 1fr 1fr; }
    .choice-centre { display: none; }
    .section-heading { grid-template-columns: 1fr; align-items: start; }
    .common-grid { grid-template-columns: 1fr; }
    .common-card { min-height: 240px; }
    .common-card h3 { margin-top: 2.5rem; }
}

@media (max-width: 640px) {

    .hero { padding: 2.5rem var(--mh-band-gutter) 1.5rem; gap: 1rem; }
    .hero h1 { font-size: clamp(2.7rem, 12vw, 4.25rem); }
    .hero-actions { gap: .5rem; margin-top: 1.2rem; }
    .button { padding: .65rem .9rem; font-size: .82rem; }
    .hero-mark { min-height: 210px; transform: scale(.65); }
    .orbit-one { width: 260px; height: 260px; }
    .orbit-two { width: 350px; height: 350px; }
    .choice-strip { grid-template-columns: 1fr; }
    .choice { min-height: 78px; padding: .85rem var(--mh-band-gutter); }
    .choice-meshcore { padding-inline: var(--mh-band-gutter); }
    .choice strong { font-size: 1.1rem; }
    .choice small { font-size: .77rem; line-height: 1.35; }
    body > footer { display: flex; gap: .35rem 1rem; padding-block: 1rem calc(4.5rem + env(safe-area-inset-bottom)); font-size: .88rem; }
    body > footer .site-links { width: 100%; margin: .35rem 0 0; }
}

