* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--n2-bg);
    font-family: var(--n2-font);
    color: var(--n2-text);
}

a {
    color: var(--n2-accent-bright);
    text-decoration: none;
}

a:focus-visible {
    outline: 2px solid var(--n2-accent-bright);
    outline-offset: 2px;
}

/* ---------- header ---------- */

.site-header {
    border-bottom: 1px solid var(--n2-border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-header .logo img {
    height: 40px;
    width: auto;
    display: block;
}

.top-nav {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.4rem;
}

.top-nav a {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--n2-text);
}

.top-nav a:hover {
    color: var(--n2-accent-bright);
}

/* ---------- hero ---------- */

.hero {
    text-align: center;
    padding: 3rem 1.5rem 0.5rem;
}

.hero h1 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--n2-text);
}

.hero p {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--n2-muted);
}

/* Unified search box (submits to search.html?searchQuery=...). */
.hero-search {
    display: flex;
    gap: 0.5rem;
    max-width: 26rem;
    margin: 1.25rem auto 0;
}
.hero-search input[type="search"] {
    flex: 1;
    min-width: 0;
    font-family: var(--n2-font);
    font-size: 0.95rem;
    color: var(--n2-card-text);
    background: var(--n2-card-bg);
    border: 1px solid var(--n2-card-border);
    border-radius: 6px;
    padding: 0.65rem 0.9rem;
}
.hero-search input[type="search"]:focus {
    outline: 2px solid var(--n2-accent-bright);
    outline-offset: 1px;
}
.hero-search button {
    font-family: var(--n2-font);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--n2-text);
    background: var(--n2-accent);
    border: 1px solid var(--n2-accent);
    border-radius: 6px;
    padding: 0.65rem 1.1rem;
    cursor: pointer;
}
.hero-search button:hover {
    background: var(--n2-accent-deep);
    border-color: var(--n2-accent-deep);
}

/* ---------- utility row ---------- */

.utility-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
    gap: 0.75rem;
    max-width: 64rem;
    margin: 1.75rem auto 0;
    padding: 0 1.5rem;
}

.utility-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--n2-surface);
    border: 1px solid var(--n2-border);
    border-radius: 8px;
    color: var(--n2-text);
    font-size: 0.78rem;
    line-height: 1.45;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.utility-card svg {
    flex-shrink: 0;
    color: var(--n2-muted);
}

.utility-card strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
}

.utility-card span {
    color: var(--n2-muted);
}

.utility-card strong {
    color: var(--n2-text);
}

.utility-card:hover {
    transform: translateY(-2px);
    border-color: var(--n2-accent-bright);
}

/* DOCS-1144 Stage 2: the Release-notes card expands to a submenu (N2OS / Arc /
   Guardian Air) on hover or keyboard focus - the portal has three separate
   release-note sets. */
.utility-menu {
    position: relative;
    cursor: pointer;
}
.utility-menu:hover,
.utility-menu:focus-within {
    transform: none; /* stay put so the dropdown anchors cleanly to the card */
    /* square off the bottom corners so the card's side borders run straight
       into the submenu's side borders instead of leaving rounded hooks at
       the seam */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.utility-submenu {
    position: absolute;
    top: calc(100% - 1px);
    /* -1px each side so the submenu's side borders sit exactly on the card's
       side borders (absolute children align to the padding box, which is
       1px inside the card's border) */
    left: -1px;
    right: -1px;
    z-index: 30;
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0.4rem 0.4rem;
    /* opaque version of the pill surface (--n2-surface is translucent) so the
       tiles the dropdown overlaps don't show through */
    background: linear-gradient(var(--n2-surface), var(--n2-surface)), var(--n2-bg);
    border: 1px solid var(--n2-accent-bright);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.utility-menu:hover .utility-submenu,
.utility-menu:focus-within .utility-submenu {
    display: flex;
}
.utility-submenu a {
    display: block;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    color: var(--n2-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}
.utility-submenu a:hover,
.utility-submenu a:focus-visible {
    background: var(--n2-bg);
    color: var(--n2-accent-bright);
    outline: none;
}

/* ---------- product tiles ---------- */

.sections {
    max-width: 64rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

.tile-section + .tile-section {
    margin-top: 2rem;
}

.section-label {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--n2-muted);
}

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
    gap: 1rem;
}

.tile {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    align-items: center;
    column-gap: 0.8rem;
    background: var(--n2-card-bg);
    border: 1px solid var(--n2-card-border);
    border-top: 4px solid var(--n2-accent-deep);
    border-radius: 0 0 8px 8px;
    padding: 0.85rem 1.1rem;
    color: var(--n2-card-text);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.tile:hover,
.tile:focus-visible {
    transform: translateY(-3px);
    border-color: var(--n2-accent);
    border-top-color: var(--n2-accent);
}

.tile img {
    width: 38px;
    height: 38px;
}

.tile h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--n2-card-text);
}

.tile p {
    grid-column: 1 / -1;
    overflow: hidden;
    min-height: 0;
    margin: 0;
    opacity: 1;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--n2-card-muted);
}

@media (prefers-reduced-motion: reduce) {
    .tile {
        transition: none;
    }
}

/* ---------- secondary links ---------- */

.resources {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    width: 100%;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.quick-links a {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--n2-text);
    background: var(--n2-surface);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 99px;
    padding: 0.45rem 1rem;
}

.quick-links a:hover {
    border-color: var(--n2-accent-bright);
    color: var(--n2-accent-bright);
}

/* ---------- footer ---------- */

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--n2-border);
    padding: 0.85rem 1.5rem;
    font-size: 0.72rem;
    color: var(--n2-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

@media (max-width: 640px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-nav {
        margin-left: 0;
        gap: 1rem;
    }

    .hero {
        padding-top: 2rem;
    }
}
