/* ==========================================================================
   VisionOnPoint styles
   1. Change the brand here: colours, fonts and shapes
   2. Everything below uses these values. Styles start at phone size,
      then the @media rules add to them for larger screens.
   ========================================================================== */

:root {
    /* Brand colours */
    --color-primary: #0b3c49;       /* deep teal-blue */
    --color-primary-dark: #072a33;
    --color-secondary: #0f6f7a;     /* teal for icons and links */
    --color-accent: #f5a524;        /* amber for main buttons */
    --color-accent-dark: #d98c0c;

    /* Neutral colours */
    --color-text: #16262b;
    --color-text-muted: #47595f;
    --color-bg: #ffffff;
    --color-bg-soft: #f2f7f8;
    --color-border: #d6e1e4;
    --color-on-dark: #ffffff;
    --color-on-dark-muted: #c9dde2;

    /* Messages and placeholders */
    --color-success-bg: #e4f5ea;
    --color-success-text: #14532d;
    --color-error-bg: #fdeaea;
    --color-error-text: #8f1d1d;
    --color-placeholder-bg: #fff3c4;
    --color-placeholder-text: #5c4300;

    /* Type */
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: var(--font-body);

    /* Shapes and spacing */
    --radius: 18px;
    --radius-small: 10px;
    --shadow: 0 8px 28px rgba(11, 60, 73, 0.09);
    --container: 1180px;
    --gutter: 20px;
    --section-space: 64px;
    --header-height: 68px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    overflow-wrap: break-word;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

h1,
h2,
h3 {
    margin: 0 0 0.5em;
    color: var(--color-primary);
    font-family: var(--font-heading);
    line-height: 1.15;
    letter-spacing: -0.015em;
}

h1 {
    font-size: clamp(2.35rem, 8vw, 4rem);
}

h2 {
    font-size: clamp(1.85rem, 5.5vw, 2.75rem);
}

h3 {
    font-size: 1.25rem;
    line-height: 1.3;
}

p {
    margin: 0 0 1em;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

address {
    font-style: normal;
}

a {
    color: var(--color-secondary);
    text-underline-offset: 0.15em;
}

/* The keyboard focus ring: dark on light areas, amber on dark areas */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.hero :focus-visible,
.pricing :focus-visible,
.site-footer :focus-visible {
    outline-color: var(--color-accent);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 100;
    padding: 12px 18px;
    border-radius: var(--radius-small);
    background: var(--color-accent);
    color: var(--color-text);
    font-weight: 700;
}

.skip-link:focus {
    top: 12px;
}

/* Yellow marker for anything you still need to supply. Search for "placeholder". */
.placeholder {
    display: inline;
    padding: 0.1em 0.4em;
    border: 1px dashed var(--color-placeholder-text);
    border-radius: 6px;
    background: var(--color-placeholder-bg);
    color: var(--color-placeholder-text);
    font-size: 0.92em;
    font-weight: 600;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 26px;
    border: 2px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
    background: var(--color-accent);
    color: var(--color-text);
}

.btn--primary:hover {
    background: var(--color-accent-dark);
}

.btn--primary[disabled] {
    opacity: 0.7;
    cursor: wait;
}

.btn--outline {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn--outline:hover {
    background: var(--color-primary);
    color: var(--color-on-dark);
}

.btn--on-dark {
    border-color: var(--color-on-dark);
    color: var(--color-on-dark);
}

.btn--on-dark:hover {
    background: var(--color-on-dark);
    color: var(--color-primary);
}

.btn--small {
    min-height: 44px;
    padding: 8px 18px;
    font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Header and navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand__logo {
    width: 196px;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    background: var(--color-bg);
    color: var(--color-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.nav-toggle__bars {
    position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle__bars::before {
    top: -6px;
}

.nav-toggle__bars::after {
    top: 6px;
}

/* The menu button only appears once JavaScript has loaded and can operate it.
   Without JavaScript, the links stay visible. */
.has-js .nav-toggle {
    display: inline-flex;
}

.site-nav {
    flex-basis: 100%;
    padding-bottom: 12px;
}

.has-js .site-nav {
    display: none;
}

.has-js .site-nav.is-open {
    display: block;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.site-nav__list a:not(.btn) {
    display: flex;
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.site-nav__login {
    margin-top: 14px;
}

.site-nav__login .btn {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
    padding-block: var(--section-space);
}

.section--soft {
    background: var(--color-bg-soft);
}

.section__intro {
    max-width: 720px;
    margin-bottom: 36px;
}

.section__intro p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

.eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--color-secondary);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.card {
    height: 100%;
    padding: 26px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    box-shadow: var(--shadow);
}

.card p:last-child {
    margin-bottom: 0;
}

.grid {
    display: grid;
    gap: 20px;
}

.rounded-img {
    width: 100%;
    border-radius: var(--radius);
}

/* Fade-in on scroll. main.js adds .is-visible as each item comes into view. */
@media (prefers-reduced-motion: no-preference) {
    .has-js .reveal {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .has-js .reveal.is-visible {
        opacity: 1;
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    padding-block: 52px;
    background: var(--color-primary);
    color: var(--color-on-dark);
}

.hero h1 {
    color: var(--color-on-dark);
}

.hero__grid {
    display: grid;
    gap: 40px;
}

.hero__lead {
    max-width: 38rem;
    color: var(--color-on-dark-muted);
    font-size: 1.2rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero__actions .btn {
    flex: 1 1 200px;
}

.eyebrow--on-dark {
    color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   The problem
   -------------------------------------------------------------------------- */
.split {
    display: grid;
    gap: 36px;
}

.people {
    margin-top: 28px;
}

.research {
    margin-top: 28px;
    padding: 22px 24px;
    border-left: 4px solid var(--color-accent-dark);
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
    background: var(--color-bg-soft);
}

.research li + li {
    margin-top: 14px;
}

.research cite {
    display: block;
    margin-top: 2px;
    font-size: 0.9rem;
    font-style: normal;
}

.distance {
    height: auto;
    margin-top: 20px;
}

.distance__row {
    margin-bottom: 16px;
}

.distance__label {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    margin-bottom: 6px;
}

.distance__track {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--color-bg-soft);
}

.distance__bar {
    height: 100%;
    border-radius: 999px;
    background: var(--color-secondary);
}

/* 8.3 metres is 75% of 11.1 metres */
.distance__bar--30 {
    width: 75%;
}

.distance__bar--40 {
    width: 100%;
    background: var(--color-accent-dark);
}

.distance__note {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: var(--color-primary);
    color: var(--color-accent);
}

.step__number {
    display: block;
    margin-bottom: 2px;
    color: var(--color-secondary);
    font-size: 0.875rem;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   The app
   -------------------------------------------------------------------------- */
.screen {
    margin: 0;
}

.screen__image {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.screen figcaption {
    padding-top: 18px;
}

.screen figcaption p {
    margin-bottom: 0;
    color: var(--color-text-muted);
}

.app-overview {
    max-width: 960px;
    margin: 48px auto 0;
    text-align: center;
}

.app-overview img {
    width: 100%;
}

.app-overview figcaption {
    max-width: 640px;
    margin: 16px auto 0;
}

.app-overview figcaption p {
    margin-bottom: 0;
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Lists with tick marks
   -------------------------------------------------------------------------- */
.ticks li {
    position: relative;
    padding-left: 30px;
}

.ticks li + li {
    margin-top: 12px;
}

.ticks li::before {
    content: "";
    position: absolute;
    top: 0.42em;
    left: 3px;
    width: 8px;
    height: 14px;
    border: solid var(--color-secondary);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.ticks--on-dark li::before {
    border-color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */
.pricing {
    display: grid;
    gap: 32px;
    padding: 34px 26px;
    border-radius: var(--radius);
    background: var(--color-primary);
    color: var(--color-on-dark);
}

.pricing h2 {
    color: var(--color-on-dark);
}

.pricing p {
    color: var(--color-on-dark-muted);
}

/* --------------------------------------------------------------------------
   Installation timeline
   -------------------------------------------------------------------------- */
.timeline {
    counter-reset: timeline;
}

.timeline__item {
    position: relative;
    padding: 0 0 30px 66px;
    counter-increment: timeline;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__item p {
    margin-bottom: 0;
}

.timeline__item::before {
    content: counter(timeline);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-on-dark);
    font-weight: 800;
}

.timeline__item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 46px;
    bottom: 0;
    left: 22px;
    width: 2px;
    background: var(--color-border);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq details {
    border-bottom: 1px solid var(--color-border);
}

.faq details:first-child {
    border-top: 1px solid var(--color-border);
}

.faq summary {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 60px;
    padding: 14px 40px 14px 0;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

/* A plus sign that becomes a minus sign when open */
.faq summary::before,
.faq summary::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 8px;
    width: 16px;
    height: 2px;
    background: var(--color-secondary);
}

.faq summary::after {
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.faq details[open] summary::after {
    transform: rotate(0);
}

.faq summary h3 {
    margin: 0;
    font-size: 1.1rem;
}

.faq details p {
    max-width: 44rem;
    padding-right: 24px;
}

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */
.contact-details {
    margin-top: 26px;
}

.contact-details a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.contact-form {
    height: auto;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.field__optional {
    color: var(--color-text-muted);
    font-weight: 400;
}

/* A font size of 16px or more stops phones zooming in when a field is tapped. */
.field input,
.field textarea {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #748a91;
    border-radius: var(--radius-small);
    background: var(--color-bg);
    color: var(--color-text);
    font: inherit;
}

.field textarea {
    resize: vertical;
}

.field [aria-invalid="true"] {
    border: 2px solid var(--color-error-text);
}

.field__error {
    margin: 6px 0 0;
    color: var(--color-error-text);
    font-size: 0.95rem;
    font-weight: 600;
}

.field__error:empty,
.form-status:empty {
    display: none;
}

/* Moved off screen, not display:none, because some bots skip fields they know are hidden. */
.trap-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-note {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.form-status {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-small);
    font-weight: 600;
}

.form-status--success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.form-status--error {
    background: var(--color-error-bg);
    color: var(--color-error-text);
}

.contact-form__submit {
    width: 100%;
}

.error-list {
    margin-bottom: 1em;
    color: var(--color-error-text);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    padding-top: 52px;
    background: var(--color-primary-dark);
    color: var(--color-on-dark-muted);
}

.site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--color-on-dark);
}

.site-footer__grid {
    display: grid;
    gap: 32px;
}

.site-footer__name {
    margin-bottom: 6px;
    color: var(--color-on-dark);
    font-size: 1.2rem;
    font-weight: 800;
}

.site-footer__heading {
    margin-bottom: 8px;
    color: var(--color-on-dark);
    font-size: 1rem;
    letter-spacing: 0;
}

.site-footer__legal {
    margin-top: 32px;
    padding-block: 20px;
    font-size: 0.95rem;
}

.site-footer__legal p {
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   Simple pages (privacy, terms and the form's no-JavaScript result page)
   -------------------------------------------------------------------------- */
.simple-page {
    max-width: 760px;
    min-height: 50vh;
    padding-block: var(--section-space);
}

/* --------------------------------------------------------------------------
   Larger screens
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    :root {
        --gutter: 32px;
        --section-space: 92px;
    }

    .brand__logo {
        width: 240px;
    }

    .site-footer__grid {
        grid-template-columns: 1.4fr 1.2fr 1fr;
    }

    .grid--3,
    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid--3 > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    /* Keeps the third app screen the same size as the other two, centred below them */
    .grid--screens > :last-child:nth-child(odd) {
        width: calc(50% - 10px);
        justify-self: center;
    }

    .hero {
        padding-block: 76px;
    }

    .hero__actions .btn {
        flex: 0 1 auto;
    }

    .pricing {
        grid-template-columns: 1.25fr 1fr;
        align-items: center;
        padding: 56px;
    }
}

@media (min-width: 1024px) {
    .hero__grid,
    .split {
        grid-template-columns: 1.1fr 1fr;
        align-items: center;
    }

    .split {
        align-items: start;
        gap: 64px;
    }

    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid--3 > :last-child:nth-child(odd) {
        grid-column: auto;
    }

    .grid--screens > :last-child:nth-child(odd) {
        width: auto;
        justify-self: stretch;
    }

    .grid--4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .faq-layout {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 56px;
        align-items: start;
    }

    /* The timeline runs across the page on large screens */
    .timeline {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }

    .timeline__item,
    .timeline__item:last-child {
        padding: 66px 0 0;
    }

    .timeline__item:not(:last-child)::after {
        top: 22px;
        right: -32px;
        bottom: auto;
        left: 46px;
        width: auto;
        height: 2px;
    }
}

/* The full menu needs this much width to fit on one line */
@media (min-width: 1120px) {
    .site-header__inner {
        flex-wrap: nowrap;
    }

    .has-js .nav-toggle {
        display: none;
    }

    .site-nav,
    .has-js .site-nav {
        display: block;
        flex-basis: auto;
        padding-bottom: 0;
    }

    .site-nav__list {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .site-nav__list a:not(.btn) {
        min-height: 44px;
        border-bottom: 0;
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .site-nav__list a:not(.btn):hover {
        color: var(--color-secondary);
        text-decoration: underline;
    }

    .site-nav__login {
        margin-top: 0;
    }

    .site-nav__login .btn {
        width: auto;
        white-space: nowrap;
    }
}

/* Smooth scrolling only for people who haven't asked for less motion */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
