:root {
    font-family: Arial, Helvetica, sans-serif;
    color: #d4d8e0;
    --nav-width: 260px;
    --header-height: 72px;
    --header-height-visible: 100px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #132830;
}

.header-fill {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: #7390B9;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
    z-index: 29;
    transition: height 1s ease-out;
}

.page-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 5px 1.5rem;
    min-height: var(--header-height);
    transition: min-height 1s ease-out;
    width: 100%;
    background: #7390B9;
    color: white;
    box-shadow: none;
}

/* ── Page tabs (About / Configure) ─────────────────────────────────────── */
.page-tabs {
    display: flex;
    gap: 4px;
    margin: 0;
}

.page-tab {
    padding: 6px 18px;
    border-radius: 6px;
    font-family: 'Rubik', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.page-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.page-tab--active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* No background grid on the Configure page */
.page--configure .main-content {
    background-image: none;
}

/* ────────────────────────────────────────────────────────────────────────── */
.page-header h1 {
    margin: 0 0 17px 0;
    font-size: 1.5rem;
    line-height: 1;
    align-self: flex-end;
}

.menu-button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    align-self: flex-end;
    margin-bottom: 17px;
    background: rgba(255, 255, 255, 0.14);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s ease;
    position: relative;
    z-index: 1;
}

.menu-button:hover,
.menu-button:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    outline: none;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger::before {
    transform: translateY(-6px);
}

.hamburger::after {
    transform: translateY(6px);
}

.menu-button.open .hamburger {
    background: transparent;
}

.menu-button.open .hamburger::before {
    transform: rotate(45deg);
}

.menu-button.open .hamburger::after {
    transform: rotate(-45deg);
}


.app-shell {
    display: flex;
    margin-top: var(--header-height);
    transition: transform 0.4s ease, margin-top 1s ease-out;
}

/* Grid background — separate element so sticky notes can sit above everything */
.nav-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--nav-width);
    max-width: calc(100vw - 12px);
    height: 100%;
    background-color: transparent;
    background-size: 35px 35px;
    z-index: 9;
    pointer-events: none;
}

.nav-bg.open {
    background-color: #132830;
    background-image:
        linear-gradient(rgba(147, 153, 155, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 153, 155, 0.2) 1px, transparent 1px);
}

.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--nav-width);
    max-width: calc(100vw - 12px);
    padding: calc(var(--header-height) + 12px) 12px 12px;
    transition: width 1s ease-out, padding-top 1s ease-out;
    z-index: 25;
    pointer-events: none;
    overflow-x: hidden;
    overflow-y: auto;
}

.side-nav.open {
    pointer-events: auto;
}

/* ── Sticky notes ──────────────────────────────────────────────────────────── */

.sticky-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

.sticky-note {
    flex: 1;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 3px;
    padding: 8px 8px 6px;
    box-shadow: 3px 4px 14px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    /* transform drives the slide-in; scale + shadow ease the hover lift over 0.3 s */
    /* only transform is transitioned (slide-in); scale + shadow snap instantly on hover */
    transition: transform 0.4s ease;
    user-select: none;
    -webkit-user-drag: none;
    width: calc(100% - 50px);  /* 50 px freed for the random left-offset */
    z-index: 0;
}

.sticky-note__img {
    flex: 1;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    margin-bottom: 6px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sticky-note__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;  /* white background disappears, only the lines show */
}

.sticky-note__label {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    font-family: 'Caveat', cursive;
    letter-spacing: 0.03em;
}

/* Colours + closed state: off-screen left with each note's own tilt */
.sticky-note--1 { background: #a8d0f5; transform: translateX(calc(-1 * var(--nav-width) - 60px)) rotate(-2deg); }
.sticky-note--2 { background: #7eb8ec; transform: translateX(calc(-1 * var(--nav-width) - 60px)) rotate(1.5deg); }
.sticky-note--3 { background: #bcddf8; transform: translateX(calc(-1 * var(--nav-width) - 60px)) rotate(-1deg); }
.sticky-note--4 { background: #8ec4f0; transform: translateX(calc(-1 * var(--nav-width) - 60px)) rotate(2deg); }
.sticky-note--5 { background: #d0e8ff; transform: translateX(calc(-1 * var(--nav-width) - 60px)) rotate(-1.5deg); }

/* Open state — slide to resting position, staggered: 1 → 3 → 4 → 2 → 5
   Each next note fires when the previous is halfway across (≈ 0.2 s at 0.4 s ease) */
.side-nav.open .sticky-note--1 { transform: rotate(-2deg);   transition-delay: 0s; }
.side-nav.open .sticky-note--2 { transform: rotate(1.5deg);  transition-delay: 0.3s; }
.side-nav.open .sticky-note--3 { transform: rotate(-1deg);   transition-delay: 0.1s; }
.side-nav.open .sticky-note--4 { transform: rotate(2deg);    transition-delay: 0.2s; }
.side-nav.open .sticky-note--5 { transform: rotate(-1.5deg); transition-delay: 0.4s; }

.sticky-note:hover {
    scale: 1.07;
    box-shadow: 8px 14px 32px rgba(0, 0, 0, 0.72);
    z-index: 1;
}

.main-content {
    position: relative;
    z-index: 11;           /* sits above side-nav (z-index 10) so the grid never overlaps text */
    width: 100%;
    min-height: calc(100vh - var(--header-height-visible));
    padding: 0;
    transition: transform 0.4s ease;
    background-color: #132830;
    background-image:
        linear-gradient(rgba(147, 153, 155, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 153, 155, 0.2) 1px, transparent 1px);
    background-size: 35px 35px;
}

.main-content.shifted {
    transform: translateX(var(--nav-width));
}

section {
    padding: 35px 2.5rem;
    line-height: 35px;
    color: #FFEFD5;
    font-family: 'Rubik', sans-serif;
}


section h2,
section h3,
section h4,
section h5,
section h6 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
}

section h2 {
    margin-top: 0;
    margin-bottom: 35px;
    font-size: 3em;
    line-height: 70px;  /* 2 grid rows */
}

/* ── Title letter squares ────────────────────────────────────────────────── */
.title-letters {
    display: flex;
    align-items: center;
    gap: 37px;
    justify-content: center;
    margin: 35px auto 35px;
    overflow-x: auto;
    padding: 20px 4px;
}

.letter-group {
    display: flex;
    flex-shrink: 0;
    gap: 2px;
}

.letter-square {
    width: calc(1.1 * 35px);
    height: calc(1.1 * 35px);
    background: #E8D5B0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 1.55rem;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    transition: background 0.1s ease, transform 0.1s ease;
}

.letter-square:hover {
    background: #dfc89c;
}

.letter-square:active {
    transform: scale(0.92);
}

#intro > h3 {
    width: fit-content;
    margin: -15px auto 25px;
    max-width: 600px;
    font-size: 2.34rem;
    line-height: 1.2;
    transition: transform 0.4s ease;
}

.main-content.shifted #intro > h3 {
    transform: translateX(calc(2 * 35px));
    width: 100%;
    text-align: right;
}

.intro-media-row h3 {
    flex: 1;
    color: #FFEFD5;
    font-size: 2.34rem;
    line-height: 1.3;
    margin: 0;
    transition: max-width 0.4s ease;
}

.main-content.shifted .intro-media-row h3 {
    max-width: calc(50vw - var(--nav-width) - 17.5px);
}

/* h3–h6: snap to the grid without changing font size or weight.
   margin-bottom: 0 means the very next content line falls in the
   immediately following grid row — no blank row between them.      */
section h3,
section h4,
section h5,
section h6 {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 35px;
}

section p {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 35px;
    color: #8AAAB8;
}

/* ── Video placeholder ───────────────────────────────────────────────────── */
.intro-media-row {
    display: flex;
    gap: 35px;
    align-items: flex-start;
    margin-bottom: 35px;
}

.video-placeholder {
    flex: 0 0 calc(50% - 17.5px);
    aspect-ratio: 16 / 9;
    background-color: #0c1e24;
    border: 1px solid #2a3a50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2a3a50;
    font-size: 5rem;
    position: relative;
    overflow: hidden;
}

.video-placeholder::after,
.products-video::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(115, 144, 185, 0.18);
    pointer-events: none;
    z-index: 1;
}

.video-placeholder video,
.products-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.products-video-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ── Header resize handle ────────────────────────────────────────────────── */

.resize-handle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    touch-action: none;
    z-index: 30;
}

.header-handle {
    left: 0;
    bottom: 0;
    width: 100%;
    height: 12px;
    cursor: ns-resize;
}

/* Suppress all transitions while the user is actively dragging */
body.resizing .page-header,
body.resizing .header-fill,
body.resizing .app-shell {
    transition: none !important;
}

/* ── #outro: How it Works interactive section ───────────────────────────── */

/* Full-screen darkening overlay, contained in main-content's stacking context
   so it darkens page content (z-index 11) but not the side-nav (25) or header */
.how-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    z-index: 20;
    transition: background 0.3s ease;
}
.how-overlay.active {
    background: rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}

/* Top row: How square + active square, centered.
   z-index 21 lifts the entire row above the overlay (20) */
.how-top-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    justify-content: center;
    position: relative;
    z-index: 21;
    margin-bottom: 35px;
    transition: transform 0.4s ease;
}

/* "How" label square — dark gray */
.how-label-square {
    width: calc(3.5 * 35px);
    height: calc(3.5 * 35px);
    background: #3d4349;
    color: #d4d8e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 3px;
    user-select: none;
    flex-shrink: 0;
}

/* Active container: relative so options can be positioned absolutely inside it */
.how-active-container {
    position: relative;
    flex-shrink: 0;
}

/* Wobble: snap left 2px, hold 2s, snap right 2px, hold 2s — 4s total cycle */
@keyframes how-wobble {
    0%, 49.9%   { translate: -2px 0; }
    50%, 99.9%  { translate: 2px 0; }
    100%        { translate: -2px 0; }
}

/* Active/current topic square — light beige with wobble */
.how-active-square {
    width: calc(3.5 * 35px);
    height: calc(3.5 * 35px);
    background: #E8D5B0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 3px;
    user-select: none;
    animation: how-wobble 4s linear infinite;
    box-shadow: 3px 4px 12px rgba(0, 0, 0, 0.35);
}

/* Stop wobble entirely while options menu is open so position is exactly 0 */
.how-active-square.menu-open {
    animation: none;
    translate: 0px 0;
}

/* Options panel: to the right of the active square, centered vertically.
   top offset = -(square_h + gap) centers the middle option on the active square */
.how-options {
    position: absolute;
    left: calc(100% + 35px);
    top: calc(-1 * (3.5 * 35px + 8px));
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.how-options.visible {
    pointer-events: auto;
}

/* Individual option squares */
.how-option {
    width: calc(3.5 * 35px);
    height: calc(3.5 * 35px);
    background: #E8D5B0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 3px;
    user-select: none;
    box-shadow: 3px 4px 14px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Middle option indented 35px to the right */
.how-option--indent {
    margin-left: 35px;
}

/* Active square in split mode (when "attach" is active) */
.how-active-square.active-split {
    background: transparent;
    box-shadow: none;
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
}

/* Active square / option in configure L-shape mode */
.how-active-square.active-configure,
.how-option--configure {
    background: transparent;
    box-shadow: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    align-items: stretch;
    justify-items: stretch;
}

/* "connect" and "electronics" options — 4 cols × 2 rows grid */
.how-active-square.active-connect,
.how-active-square.active-electronics,
.how-option--connect,
.how-option--electronics {
    width: calc(7 * 35px + 4px);   /* 4 cells wide: 2×(3.5×35) + 3 gaps */
    background: transparent;
    box-shadow: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    align-items: stretch;
    justify-items: stretch;
}

.how-option-cell {
    background: #E8D5B0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 3px;
    box-shadow: 3px 4px 14px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* "they attach" option — two half-size squares stacked */
.how-option--split {
    background: transparent;
    box-shadow: none;
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
}

.how-option-half {
    width: calc(3.5 * 35px / 2);
    flex: 1;
    background: #E8D5B0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 3px;
    box-shadow: 3px 4px 14px rgba(0,0,0,0.5);
    pointer-events: none;
}

.how-option.visible {
    opacity: 1;
}

/* ── how-deco: 6 decorative squares beside the How label ──────────────── */
.how-deco {
    display: grid;
    grid-template-columns: repeat(3, calc(3.5 * 35px / 2));
    grid-template-rows: repeat(2, calc(3.5 * 35px / 2));
    gap: 4px;
    flex-shrink: 0;
    position: relative;
    overflow: visible;   /* squares animate outside the grid bounds */
}

.how-deco-cell {
    background: #C8BD9E;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 3px;
    box-shadow: 3px 4px 14px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
    transition: background 0.3s ease;
}

.how-deco-cell.light {
    background: #EDD49C;
}

/* Bottom row: square video placeholder + description text */
.how-bottom-row {
    display: flex;
    gap: 35px;
    align-items: flex-start;
    transition: transform 0.4s ease;
}

/* ── Products section: three staggered video placeholders ─────────────── */
#text {
    margin-top: calc(-7 * 35px);
}
.products-videos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 35px;
    margin: 35px 0;
}

.products-video {
    min-width: 0;
    align-self: start;
    aspect-ratio: 16 / 9;
    background: #0c1e24;
    border: 1px solid #2a3a50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2a3a50;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.products-video:nth-child(1) { grid-column: 1; grid-row: 1; transition: transform 0.4s ease; }
.products-video:nth-child(2) { grid-column: 3; grid-row: 1; transition: transform 0.4s ease; }
.products-video:nth-child(3) { grid-column: 2; grid-row: 2; transition: transform 0.4s ease; transform: translateX(calc(4 * 35px)); }

.products-text {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
    /* Cap height to the video's aspect-ratio height so the text can never inflate
       the grid row and push the bottom video down. */
    max-height: calc((100vw - 5rem - 70px) / 3 * 9 / 16);
    padding: 0 12px 0 12px;
    align-self: start;
    overflow: hidden;
    color: #FFEFD5;
    font-size: 1rem;
    line-height: 1.4;
    pointer-events: none;
    transition: padding 0.4s ease;
    /* opacity has no transition entry — changes snap instantly */
}

.products-text.pt-snap-hidden {
    opacity: 0;
}

/* When sidebar opens, grow padding inward by each video's shift amount so the
   text content area narrows. JS snaps opacity to 0 at the 19-char threshold. */
.main-content.shifted .products-text {
    padding: 0 257px 0 152px;
}

.main-content.shifted .products-video:nth-child(1) { transform: translateX(calc(4 * 35px)); }
.main-content.shifted .products-video:nth-child(2) { transform: translateX(calc(-7 * 35px)); }
.main-content.shifted .products-video:nth-child(3) { transform: translateX(calc(2 * 35px)); }

/* ── Future Goals section ──────────────────────────────────────────────── */
#section1 h2 {
    margin-top: calc(-1.5 * 35px);
}
.fg-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px;
    margin-top: calc(-70px + 1.5 * 35px);
}

.fg-row {
    display: flex;
    gap: 35px;
    transition: transform 0.4s ease;
}

/* Shift the top row right by half an image+gap so the rows stagger like bricks */
.fg-row--top {
    transform: translateX(calc((7 * 35px + 35px) / 2));
}

.main-content.shifted .fg-row--top {
    transform: translateX(calc((7 * 35px + 35px) / 2 - 3 * 35px));
}

.main-content.shifted .fg-row--bottom {
    transform: translateX(calc(-4 * 35px));
}

.fg-img {
    flex-shrink: 0;
    width: calc(7 * 35px);
    height: calc(7 * 35px);
    background: #0c1e24;
    border: 1px solid #2a3a50;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: background 0.35s ease;
}

.fg-img:hover {
    background: #132830;
}

.fg-hover-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: #FFEFD5;
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.fg-img:hover .fg-hover-text {
    opacity: 1;
}

.fg-img-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    transition: opacity 0.35s ease;
}

.fg-img:hover .fg-img-photo {
    opacity: 0;
}

.fg-img:hover::after {
    opacity: 0;
}

/* Blue tint overlay over fg images, sits above the photo but below hover text */
.fg-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(115, 144, 185, 0.18);
    pointer-events: none;
    z-index: 1;
    border-radius: 4px;
    transition: opacity 0.35s ease;
}

.fg-hover-text {
    z-index: 2;
}

/* Configure page hero image */
.configure-hero-wrap {
    position: relative;
    display: inline-block;
    margin-top: 35px;
    border-radius: 4px;
    overflow: hidden;
}

.configure-hero-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(115, 144, 185, 0.18);
    pointer-events: none;
}

.configure-hero {
    display: block;
    max-width: 100%;
    border-radius: 4px;
}

/* ── About Us section ──────────────────────────────────────────────────── */
.au-img {
    width: calc(25 * 35px);
    max-width: 100%;
    height: calc(3 * 35px);
    background: #0c1e24;
    border: 1px solid #2a3a50;
    border-radius: 4px;
    margin-top: 35px;
    position: relative;
    overflow: hidden;
}

.au-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(115, 144, 185, 0.18);
    pointer-events: none;
    z-index: 1;
}

.signup-block {
    margin-top: calc(2 * 35px);
}

.signup-label {
    color: #FFEFD5;
    margin-bottom: 14px;
    font-size: 1rem;
}

.signup-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.signup-input {
    flex: 0 0 calc(10 * 35px);
    padding: 10px 14px;
    background: #0c1e24;
    border: 1px solid #2a3a50;
    border-radius: 4px;
    color: #FFEFD5;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.signup-input::placeholder {
    color: #3a5060;
}

.signup-input:focus {
    border-color: #7390b9;
}

.signup-btn {
    padding: 10px 22px;
    background: transparent;
    border: 1px solid #7390b9;
    border-radius: 4px;
    color: #FFEFD5;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.signup-btn:hover {
    background: rgba(115, 144, 185, 0.18);
}

.signup-thanks {
    color: #7390b9;
    margin-top: 12px;
    font-size: 0.9rem;
}

/* ── Signup page (signup.html) ────────────────────────────────────────── */
.page--signup-main {
    padding: 0 !important;
    overflow: hidden;
}

.su-hero {
    position: relative;
    width: 100%;
    height: calc(100dvh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
}

.su-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.su-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 30, 36, 0.78);
}

.su-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    max-width: 560px;
    width: 100%;
}

.su-hero-label {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #FFEFD5;
    letter-spacing: 0.03em;
    margin: 0;
}

.su-hero-form {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.su-hero-input {
    flex: 0 1 320px;
    padding: 11px 15px;
    background: rgba(12, 30, 36, 0.88);
    border: 1px solid #2a3a50;
    border-radius: 4px;
    color: #FFEFD5;
    font-size: 1rem;
    font-family: 'Rubik', sans-serif;
    outline: none;
    transition: border-color 0.2s ease;
}

.su-hero-input::placeholder {
    color: #3a5060;
}

.su-hero-input:focus {
    border-color: #7390b9;
}

.su-hero-btn {
    padding: 11px 24px;
    background: transparent;
    border: 1px solid #7390b9;
    border-radius: 4px;
    color: #FFEFD5;
    font-size: 1rem;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.su-hero-btn:hover {
    background: rgba(115, 144, 185, 0.2);
}

.su-hero-thanks {
    color: #7390b9;
    font-size: 1rem;
    font-family: 'Rubik', sans-serif;
    margin: 0;
}

.su-hero-error {
    color: #e08888;
    font-size: 0.9rem;
    font-family: 'Rubik', sans-serif;
    margin: 0;
}

@media (max-width: 768px) {
    .su-hero-form {
        flex-direction: column;
        align-items: stretch;
    }
    .su-hero-input {
        flex: none;
        width: 100%;
    }
    .su-hero-label {
        font-size: 1.15rem;
    }
}

/* ─────────────────────────────────────────────────────────────────────── */
.how-video-square {
    flex: 0 0 calc(50% - 17.5px);   /* half container minus half gap — never changes size */
    aspect-ratio: 1;
    background: #0c1e24;
    border: 1px solid #2a3a50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2a3a50;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.how-video-square::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(115, 144, 185, 0.18);
    pointer-events: none;
    z-index: 1;
}

.placeholder-fill-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.how-description {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    transition: max-width 0.4s ease;
}

.how-description p {
    color: #8AAAB8;
    margin: 0;
    line-height: 35px;
}

/* Re-centre the top row within the visible area when nav is open */
.main-content.shifted #outro .how-top-row {
    transform: translateX(calc(-1 * var(--nav-width) / 2));
}

/* Shift the bottom row right so the video clears the sidebar by 3 grid squares.
   The natural left edge is already past the sidebar (nav-width + section-padding),
   so +105px gives an extra 3×35px of breathing room. */
.main-content.shifted #outro .how-bottom-row {
    transform: translateX(calc(3 * 35px));
}

/* Cap the description width to what fits in the visible viewport area.
   Derivation: 50vw - nav-width - left-padding - (3-square shift) - half-gap */
.main-content.shifted #outro .how-description {
    max-width: calc(50vw - var(--nav-width) - 2.5rem - 3 * 35px - 17.5px);
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 24;
    pointer-events: none;
    transition: background 0.4s ease;
}

@media (max-width: 720px) {
    .main-content.shifted {
        transform: translateX(calc(min(80vw, var(--nav-width))));
    }
}

@media (max-width: 768px) {
    .mobile-overlay {
        display: block;
    }

    .mobile-overlay.active {
        background: rgba(0, 0, 0, 0.55);
        pointer-events: auto;
    }

    .main-content.shifted {
        transform: none !important;
    }
}

/* ── Tablet (≤768px) ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {

    section {
        padding: 35px 1.25rem;
    }

    section h2 {
        font-size: 2.2em;
        line-height: 1.3;
        margin-bottom: 20px;
    }

    /* ── Intro ── */
    #intro > h3 {
        font-size: 1.6rem;
    }

    .intro-media-row {
        flex-direction: column;
    }

    .video-placeholder {
        flex: 0 0 auto;
        width: 100%;
    }

    #intro > h3 {
        font-size: 1rem;
    }

    .intro-media-row h3 {
        font-size: 1.5rem;
        max-width: 100% !important;
    }

    #intro .intro-media-row:nth-child(4) .video-placeholder { order: 1; }
    #intro .intro-media-row:nth-child(4) h3                  { order: 2; }

    .main-content.shifted #intro > h3 {
        transform: none;
        width: auto;
        text-align: left;
    }

    /* ── Products ── */
    #text {
        margin-top: calc(-6 * 35px);
    }

    .products-videos {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .products-video:nth-child(1),
    .products-video:nth-child(2),
    .products-video:nth-child(3) {
        grid-column: 1 !important;
        grid-row: auto !important;
        transform: none !important;
    }

    .main-content.shifted .products-video:nth-child(1),
    .main-content.shifted .products-video:nth-child(2),
    .main-content.shifted .products-video:nth-child(3) {
        transform: none !important;
    }

    .products-text {
        grid-column: 1 !important;
        grid-row: auto !important;
        max-height: none;
        padding: 0 !important;
        opacity: 1 !important;
    }

    /* ── Title squares ── */
    .letter-square {
        width: calc(35px);
        height: calc(35px);
        font-size: 1.2rem;
    }

    .title-letters {
        gap: 20px;
    }

    /* ── How it Works ── */
    .how-deco {
        display: grid;
        flex-basis: 100%;
        justify-content: center;
        grid-template-columns: repeat(3, calc(3 * 35px / 2));
        grid-template-rows: repeat(2, calc(3 * 35px / 2));
    }

    .how-top-row {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 20px;
    }

    .how-label-square,
    .how-active-square {
        width: calc(3 * 35px);
        height: calc(3 * 35px);
    }

    .how-option {
        width: calc(3 * 35px);
        height: calc(3 * 35px);
        font-size: 0.78rem;
    }

    .how-active-square.active-connect,
    .how-active-square.active-electronics,
    .how-option--connect,
    .how-option--electronics {
        width: calc(5 * 35px + 4px);
    }

    .how-option-half {
        width: calc(3 * 35px / 2);
    }

    .how-options {
        left: 0;
        top: auto;
        bottom: calc(100% + 8px);
    }

    .how-bottom-row {
        flex-direction: column;
    }

    .how-video-square {
        flex: 0 0 auto;
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .how-description {
        max-width: 100% !important;
    }

    .main-content.shifted #outro .how-top-row,
    .main-content.shifted #outro .how-bottom-row {
        transform: none;
    }

    /* ── Future Goals ── */
    .fg-images {
        margin-top: calc(-35px + 1.5 * 35px);
    }

    .fg-img {
        width: calc(5 * 35px);
        height: calc(5 * 35px);
    }

    .fg-row--top {
        transform: none;
        justify-content: center;
    }

    .fg-row--bottom {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-content.shifted .fg-row--top,
    .main-content.shifted .fg-row--bottom {
        transform: none;
    }

    /* ── About Us ── */
    .au-img {
        width: 100%;
    }

    /* ── Signup form ── */
    .signup-form {
        flex-direction: column;
        align-items: stretch;
    }

    .signup-input {
        flex: none;
        width: 100%;
    }

    .signup-btn {
        width: 100%;
    }
}

/* ── Mobile (≤480px) ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {

    section {
        padding: 35px 1rem;
    }

    section h2 {
        font-size: 1.8em;
    }

    .letter-square {
        width: calc(0.85 * 35px);
        height: calc(0.85 * 35px);
        font-size: 1rem;
    }

    .title-letters {
        gap: 14px;
    }

    .how-deco {
        grid-template-columns: repeat(3, calc(2.5 * 35px / 2));
        grid-template-rows: repeat(2, calc(2.5 * 35px / 2));
    }

    #intro > h3,
    .intro-media-row h3 {
        font-size: 1.2rem;
    }

    .fg-img {
        width: calc(4 * 35px);
        height: calc(4 * 35px);
    }

    .fg-row--top {
        justify-content: center;
    }

    .fg-row--bottom {
        flex-wrap: wrap;
        justify-content: center;
    }

    .how-label-square,
    .how-active-square {
        width: calc(2.5 * 35px);
        height: calc(2.5 * 35px);
        font-size: 0.75rem;
    }

    .how-option {
        width: calc(2.5 * 35px);
        height: calc(2.5 * 35px);
        font-size: 0.72rem;
    }

    .how-active-square.active-connect,
    .how-active-square.active-electronics,
    .how-option--connect,
    .how-option--electronics {
        width: calc(4 * 35px + 4px);
    }

    .how-option-half {
        width: calc(2.5 * 35px / 2);
    }
}
