* {
    box-sizing: border-box;
}

/* One horizontal gutter for the whole page, so content sits the same distance from both edges. */
:root {
    --page-gutter: clamp(16px, 5vw, 80px);
    --column-gap: clamp(24px, 4vw, 64px);
}

body {
    margin: 0;
    background: #FFFF;
    overflow-x: hidden;
    font-family: 'Wix Madefor Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.header {
    display: flex;
    justify-content: space-between;
    padding: 10px var(--page-gutter);
    margin: 0;
    /* same tint the hero starts with, so there is no seam between header and hero */
    background: #fbfcff;
    position: sticky;
    top: 0;
    z-index: 100;
    text-align: center;
}

.logo{
    display: flex;
    align-items: center;
}

.navigation-pages{
    display: flex;
    flex-direction: row;
    gap: 10px;
    color: #4b5563;
}

.ios{
    background-color: black;
    color: white;
    border: none;
    border-radius: 24px;
    height: 40px;
    padding: 10px;
}

.header h2 {
    font-family: 'Wix Madefor Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0b1235;
}

.main-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 var(--column-gap);
    min-height: 90vh;
    max-width: calc(1440px + var(--page-gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--page-gutter);
}

.text-section {
    flex: 1 1 400px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 50%;
    text-align: left;
    margin: 0;
    padding: 0;
    container-type: inline-size;
}

.hiw-header{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.text-section * {
    margin: 0;
}

h1 {
    font-family: 'Wix Madefor Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: clamp(3rem, 20.4cqi, 7.2rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.05;
    color: #111;
}

.typeit {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-weight: 400;
    color: #1058ea;
}

.text-section p {
    font-size: 1.25rem;
    line-height: 1.5;
    color: #6b7280;
    font-weight: 400;
    max-width: 480px;
}

.text-body p {
    color: #4b5563;
    line-height: 1.55;
    max-width: 34rem;
    text-wrap: balance;
}

.text-section p strong {
    color: #1058ea;
    font-weight: 700;
}

#waitlist-form {
    display: flex;
    flex-flow: row wrap;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 600px;
}

.hp-field {
    position: absolute;
    left: -9999px;
}

.text-section input {
    flex: 4 1 0;
    min-width: 0;
    padding: 14px 24px;
    text-overflow: ellipsis;
    font-size: 1.05rem;
    border: 1.5px solid #b6b8bc;
    border-radius: 40px;
    background: #fff;
    color: #111;
    font-family: inherit;
}

.text-section input::placeholder {
    color: #6b7280;
}

.text-section input:focus {
    outline: none;
    background: #fff;
    border-color: #1058ea;
}

.text-section button {
    /* ~20% of the row, but never narrower than its label so the text can't overflow */
    flex: 1 1 0;
    min-width: max-content;
    padding: 14px 16px;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #3454e0;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 160ms cubic-bezier(0.23, 1, 0.32, 1), transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
    .text-section button:hover {
        background: #2a45c4;
    }
}

.text-section button:active {
    transform: scale(0.97);
}

#form-success,
#form-error {
    flex: 0 0 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 18px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 40px;
    text-align: center;
}

#form-success {
    color: #fff;
    background: #3454e0;
}

#form-error {
    color: #b42318;
    background: #fdecea;
}

.how-it-works{
    display: flex;
    flex: 1 1 400px;
    width: 50%;
    /* right-aligned so the phones end on the same gutter the text starts on */
    justify-content: flex-end;
    align-items: center;
}

.how-it-works-section img {
    width: 100%;
    max-width: 680px;
    height: auto;
}

/* Stack and centre at the width where the two 400px columns (plus gutters and gap) stop fitting side by side,
   so the demo never wraps under a left-aligned text column. */
@media (max-width: 960px) {
    .main-section {
        flex-direction: column;
        align-items: center;
        min-height: unset;
        padding: 48px var(--page-gutter);
    }

    .text-section,
    .how-it-works-section {
        width: 100%;
        padding: 0;
    }

    .how-it-works-section {
        justify-content: center;
    }

    .text-section {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 900px) {
    .how-it-works-section {
        display: none;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 24px 16px;
    }

    .main-section {
        padding: 32px var(--page-gutter);
    }

    #waitlist-form {
        gap: 8px;
    }

    .text-section input,
    .text-section button {
        padding: 11px 14px;
    }

    #form-success,
    #form-error {
        padding: 14px 14px;
        font-size: 1rem;
    }

    .text-body {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

@media (max-width: 360px) {
    .header h2 {
        font-size: 1.35rem;
    }

    .text-section p {
        font-size: 1.1rem;
    }
}

.text-body{
    margin-top: 28px;
    margin-bottom: 28px;
}

/* Hero headline typing animation */
.text-section h1.typeit .tc { opacity: 0; }
.text-section h1.typeit .tc.on { opacity: 1; }

.type-caret {
    display: inline-block;
    width: 0.06em;
    height: 0.85em;
    margin-left: 0.04em;
    vertical-align: -0.05em;
    background: currentColor;
    animation: caret-blink 0.9s steps(1) infinite;
}

@keyframes caret-blink {
    50% { opacity: 0; }
}

.text-section h1,
.phone-stack {
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.text-section h1.seq-hidden,
.phone-stack.seq-hidden {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .text-section h1, .phone-stack { transition: none; }
    .type-caret { animation: none; }
}

/* Three phones: the demo video in front, with a screenshot phone tucked behind it on each side,
   tilted outward. --ph is the base phone height (the middle phone is drawn 10% taller);
   everything else scales from it. */
.phone-stack {
    --ph: min(78vh, 680px, max(36vw, 420px));
    /* Width the stack may take up. The tilted stack is ~1.6 x --ph wide, so the side phones
       slide further behind the middle one until it fits, keeping at least a third of each visible. */
    --fit: min(50vw - var(--page-gutter) - var(--column-gap) / 2, 720px);
    --overlap: clamp(calc(var(--ph) * 0.11),
                     calc((var(--ph) * 1.6 - var(--fit)) / 2),
                     calc(var(--ph) * 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    /* The tilted right phone pokes out past its layout box by ~0.093 x --ph; pull the stack in
       by that much so its visible edge lands on the page gutter. */
    margin-right: calc(var(--ph) * 0.093);
}

/* Once the hero stacks, size from the full width and keep the middle phone large; the side
   phones tuck further behind it to stay inside the screen. */
@media (max-width: 960px) {
    .phone-stack {
        --ph: min(75vh, 620px, 90vw);
        --fit: calc(100vw - var(--page-gutter) * 2);
        margin-right: 0;
    }
}

/* Hero product demo: screen recording inside an iPhone 17 bezel.
   Bezel art is 675x1380; its screen opening is 603x1311 at (36, 34.5). The screen is rounded
   (75px corner radius in bezel pixels) so its corners tuck under the bezel's curved inner edge. */
.phone-demo {
    position: relative;
    height: var(--ph);
    aspect-ratio: 675 / 1380;
    filter: drop-shadow(0 36px 50px rgba(40, 40, 120, 0.34))
            drop-shadow(0 12px 18px rgba(40, 40, 120, 0.18));
}

.phone-screen {
    position: absolute;
    left: 5.3333%;
    top: 2.5%;
    width: 89.3333%;
    height: 95%;
    overflow: hidden;
    border-radius: 12.4% / 5.7%;
    background: #fff;
}

.phone-main {
    z-index: 2;
    height: calc(var(--ph) * 1.1);
}

.phone-side {
    z-index: 1;
    height: calc(var(--ph) * 0.9);
    transform-origin: bottom center;
}

.phone-left {
    margin-right: calc(var(--overlap) * -1);
    transform: translateY(5%) rotate(-6deg);
}

.phone-right {
    margin-left: calc(var(--overlap) * -1);
    transform: translateY(5%) rotate(6deg);
}

.phone-screen video,
.phone-screen img {
    display: block;
    max-width: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-demo .phone-bezel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    pointer-events: none;
}

.footer-menu{
    display: flex;
    background-color: #fff;
    justify-content: space-between;
    /* same grey as the header navigation */
    color: #4b5563;
    padding: 10px var(--page-gutter);
}

.footer-menu-items{
    display: flex;
    gap: 10px;
}

@media (max-width: 650px) {
    .footer-menu {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 24px var(--page-gutter);
        text-align: center;
    }

    .footer-menu-items {
        flex-wrap: wrap;
        justify-content: center;
        column-gap: 10px;
        row-gap: 0;
    }

    .footer-menu p {
        margin: 6px 0;
    }
}
/* hamburger menu below 650px */
.nav-toggle {
    display: none;
}

@media (max-width: 650px) {
    .header {
        align-items: center;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        padding: 0 9px;
        background: none;
        border: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-toggle span {
        display: block;
        height: 2px;
        background: #0b1235;
        border-radius: 2px;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .navigation-pages {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 10;
        flex-direction: column;
        gap: 0;
        padding: 8px var(--page-gutter) 16px;
        background: #fbfcff;
        border-bottom: 1px solid #eceef3;
        text-align: left;
    }

    .nav-open .navigation-pages {
        display: flex;
    }

    .navigation-pages .nav-divider {
        display: none;
    }

    .navigation-pages p {
        margin: 0;
        padding: 12px 0;
    }
}

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

html {
    scroll-behavior: smooth;
    /* keep anchor targets clear of the fixed header */
    scroll-padding-top: 72px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

.navigation a {
    color: inherit;
    text-decoration: none;
}

@media (max-width: 650px) {
    .navigation-pages .navigation a {
        display: block;
        padding: 12px 0;
        margin: -12px 0;
    }
}

.footer-menu a,
.logo a {
    color: inherit;
    text-decoration: none;
}

/* Legal pages (privacy, contact): a single readable column */
.legal-inner {
    max-width: calc(760px + var(--page-gutter) * 2);
    margin: 0 auto;
    padding: 48px var(--page-gutter) 96px;
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
    overflow-wrap: break-word;
}

.legal h1 {
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    color: #0b1235;
    margin: 0 0 8px;
}

.legal h2 {
    font-family: 'Wix Madefor Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1.4rem;
    line-height: 1.3;
    color: #0b1235;
    margin: 48px 0 12px;
}

.legal h3 {
    font-size: 1.1rem;
    line-height: 1.35;
    color: #0b1235;
    margin: 32px 0 8px;
}

.legal p,
.legal address {
    margin: 0 0 16px;
}

.legal address {
    font-style: normal;
}

.legal strong {
    color: #374151;
}

.legal a {
    color: #1058ea;
    overflow-wrap: anywhere;
}

.legal-updated {
    font-weight: 600;
    color: #6b7280;
}

.legal ul,
.legal ol {
    margin: 0 0 16px;
    padding-left: 1.4em;
}

.legal li {
    margin-bottom: 6px;
}

.legal li ul {
    margin: 8px 0 0;
}

.legal-toc a {
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .legal-toc a:hover {
        text-decoration: underline;
    }
}

.legal-table-wrap {
    overflow-x: auto;
    margin: 0 0 16px;
}

.legal table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.legal th,
.legal td {
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.legal th {
    background: #f6f7fb;
    color: #0b1235;
}

.legal td:last-child {
    text-align: center;
    white-space: nowrap;
}

/* Contact page */
.contact-lede {
    font-size: 1.15rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0 0;
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    color: #0b1235;
}

.contact-field[hidden] {
    display: none;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 400;
    color: #111;
    background: #fff;
    border: 1.5px solid #b6b8bc;
    border-radius: 12px;
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #1058ea;
}

.contact-form button {
    align-self: flex-start;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #3454e0;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: background-color 160ms cubic-bezier(0.23, 1, 0.32, 1), transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
    .contact-form button:hover {
        background: #2a45c4;
    }
}

.contact-form button:active {
    transform: scale(0.97);
}

.contact-status {
    padding: 16px 20px;
    font-weight: 600;
    border-radius: 12px;
}

#contact-success {
    color: #fff;
    background: #3454e0;
}

#contact-error {
    color: #b42318;
    background: #fdecea;
}

@media (max-width: 650px) {
    .legal-inner {
        padding: 32px var(--page-gutter) 64px;
    }

    .legal h2 {
        margin-top: 40px;
    }

    .contact-form button {
        align-self: stretch;
    }
}

/* Privacy and contact pages have no tinted hero, so the header (and its mobile menu) stays white to match */
.subpage .header,
.subpage .navigation-pages {
    background: #fff;
}

/* Same faint square grid as the homepage hero (hero-demo.css .hero), fading out at the top and
   bottom. The top fade is white rather than the hero's #fbfcff so it meets the white subpage header. */
.contact {
    --grid-line: #eceef3;
    --grid-size: 50px;
    background:
        linear-gradient(180deg, #ffffff 0, rgba(255, 255, 255, 0) 220px),
        linear-gradient(0deg, #ffffff 0, rgba(255, 255, 255, 0) 280px),
        linear-gradient(var(--grid-line) 1px, transparent 1px) center top / var(--grid-size) var(--grid-size),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) center top / var(--grid-size) var(--grid-size),
        #ffffff;
}

/* Card around the contact form so it lifts off the grid */
.contact .contact-form {
    padding: 32px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 24px 48px -12px rgba(40, 40, 120, 0.14),
                0 4px 12px rgba(40, 40, 120, 0.06);
}

@media (max-width: 650px) {
    .contact .contact-form {
        padding: 20px;
        border-radius: 16px;
    }
}

/* Consent line under the waitlist button */
.text-section p.form-note {
    max-width: none;
    font-size: 0.75rem;
    font-weight: 300;
    line-height: 1.5;
    color: #6b7280;
}

.form-note a {
    color: #1058ea;
}

/* hide the waitlist consent line on phones (below tablet width) */
@media (max-width: 767px) {
    .text-section p.form-note {
        display: none;
    }
}

.form-note--footer {
    display: none;
    margin: 0;
    padding: 24px var(--page-gutter) 0;
    font-size: 0.75rem;
    font-weight: 300;
    line-height: 1.5;
    color: #6b7280;
    text-align: center;
}

@media (max-width: 767px) {
    .form-note--footer {
        display: block;
    }
}
