/* Stile website. Colours and type come from the old Elementor kit (global colours/fonts). */

:root {
    --purple: #443355;
    --green: #64db8a;
    --ink: #181818;
    --off-white: #fafafa;
    --light-grey: #f4f4f4;
    --white: #ffffff;

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* The old site used ~87% wide content (calc(100% - 87%) side padding) */
    --gutter: max(16px, 6.5vw);
    --radius-card: 24px;
    --radius-btn: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--purple);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.5em;
}

h2 {
    font-size: clamp(2rem, 1.4rem + 2.4vw, 3.125rem); /* up to 50px */
}

h3 {
    font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
}

p {
    margin: 0 0 1em;
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--purple);
    color: var(--white);
    border-radius: var(--radius-btn);
}

.skip-link:focus {
    top: 1rem;
}

:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 3px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border: 2px solid transparent;
    border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn--green {
    background: var(--green);
    color: var(--purple);
}

.btn--green:hover {
    background: var(--off-white);
}

.btn--light {
    background: var(--off-white);
    color: var(--purple);
}

.btn--light:hover {
    background: var(--green);
}

.btn--purple {
    background: var(--purple);
    color: var(--off-white);
}

.btn--purple:hover {
    background: var(--green);
    color: var(--ink);
}

.btn--outline {
    background: transparent;
    color: var(--purple);
    border-color: var(--purple);
}

.btn--outline:hover {
    background: var(--green);
    border-color: var(--green);
}

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

.btn--outline-white:hover {
    background: var(--green);
    border-color: var(--green);
    color: var(--ink);
}

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

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Header ---------- */

.site-header {
    padding: 30px var(--gutter);
    position: relative;
    z-index: 10;
}

/* Pages that open with a photo banner have the header on top of it */
.has-hero .site-header {
    position: absolute;
    inset: 0 0 auto;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-header__logo img {
    width: 140px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.site-nav__list {
    display: flex;
    gap: 32px;
}

.site-nav__list a {
    font-weight: 700;
    text-decoration: none;
    color: var(--purple);
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}

.site-nav__list a:hover,
.site-nav__list a[aria-current='page'] {
    color: var(--white);
    border-bottom-color: var(--white);
}

/* Inner-page banners are darker photos than the home hero, so the nav goes white there */
.has-hero:not(.page-home) .site-nav__list a {
    color: var(--white);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.has-hero:not(.page-home) .site-nav__list a:hover,
.has-hero:not(.page-home) .site-nav__list a[aria-current='page'] {
    color: var(--green);
    border-bottom-color: var(--green);
}

.page-simple .site-nav__list a:hover,
.page-simple .site-nav__list a[aria-current='page'] {
    color: var(--purple);
    border-bottom-color: var(--green);
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 11px;
    border: 0;
    border-radius: var(--radius-btn);
    background: var(--purple);
    cursor: pointer;
}

.nav-toggle__bar {
    display: block;
    height: 3px;
    margin: 4px 0;
    border-radius: 2px;
    background: var(--green);
}

@media (max-width: 1024px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: var(--gutter);
        right: var(--gutter);
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px;
        border-radius: var(--radius-card);
        background: var(--purple);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav__list {
        flex-direction: column;
        gap: 4px;
    }

    .site-nav__list a,
    .page-simple .site-nav__list a {
        display: block;
        padding: 0.6rem 0.5rem;
        color: var(--white);
    }

    .site-nav__list a:hover {
        color: var(--green);
        border-bottom-color: transparent;
    }
}

/* ---------- Hero ---------- */

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 160px var(--gutter) 120px;
    background: var(--purple) url('/assets/img/hero-countryside.webp') center / cover no-repeat;
    color: var(--off-white);
    text-align: center;
}

.hero__inner {
    max-width: 860px;
}

.hero__title {
    font-size: clamp(2.5rem, 1.6rem + 4vw, 3.75rem); /* up to 60px */
    color: var(--off-white);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.hero__lead {
    max-width: 640px;
    margin: 0 auto 2rem;
    font-size: 1.375rem;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

/* ---------- What is Stile? ---------- */

.intro {
    padding: 100px var(--gutter);
    background: url('/assets/img/hash-pattern.webp') right 4% center / min(46vw, 560px) no-repeat;
}

.intro__inner {
    display: grid;
    grid-template-columns: 49fr 45fr;
    gap: 6%;
    align-items: center;
}

.intro__phones {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.intro__phones img {
    width: min(48%, 300px);
}

.intro__phones img:last-child {
    margin-top: 60px;
}

@media (max-width: 860px) {
    .intro__inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .intro__copy {
        order: -1;
    }
}

/* ---------- Carousels (feature cards + testimonials) ---------- */

.features {
    padding: 0 var(--gutter) 20px;
}

.carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.carousel__track {
    display: flex;
    gap: 24px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px;
}

.carousel__track::-webkit-scrollbar {
    display: none;
}

.carousel__track > .card {
    flex: 0 0 calc((100% - 3 * 24px) / 4);
    scroll-snap-align: start;
}

.carousel__track--wide > .card {
    flex-basis: calc((100% - 2 * 24px) / 3);
}

@media (max-width: 1024px) {
    .carousel__track > .card,
    .carousel__track--wide > .card {
        flex-basis: calc((100% - 24px) / 2);
    }
}

@media (max-width: 640px) {
    .carousel__track > .card,
    .carousel__track--wide > .card {
        flex-basis: 85%;
    }
}

.carousel__arrow {
    flex: none;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--purple);
    cursor: pointer;
}

.carousel__arrow:hover {
    background: var(--light-grey);
}

.carousel__arrow:disabled {
    opacity: 0.3;
    cursor: default;
    background: transparent;
}

/* Phones swipe the track instead; this must come after the base .carousel__arrow rule */
@media (max-width: 640px) {
    .carousel__arrow {
        display: none;
    }
}

.carousel__arrow svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border-radius: var(--radius-card);
    background: var(--purple);
    color: var(--white);
    text-align: center;
}

.card h3 {
    margin: 0;
    color: var(--white);
}

.card p {
    margin: 0;
    font-size: 1rem;
}

.card--testimonial img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--green);
}

.card--testimonial blockquote {
    margin: 0;
}

/* ---------- Why choose Stile ---------- */

.why {
    margin-top: 100px;
    padding: 100px var(--gutter);
    background: var(--green);
    color: var(--purple);
}

.why > h2 {
    text-align: center;
}

.why__inner {
    display: grid;
    grid-template-columns: 44fr 53fr;
    gap: 3%;
    align-items: center;
    margin-top: 60px;
}

.why__image {
    width: 100%;
    border-radius: var(--radius-card);
}

.why__copy {
    font-size: 1.25rem;
}

.why__copy .btn {
    margin-top: 0.5rem;
}

@media (max-width: 860px) {
    .why__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ---------- Members ---------- */

.members {
    padding: 100px var(--gutter);
}

.members__header {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
    font-size: 1.25rem;
}

/* ---------- Join CTA ---------- */

.join {
    padding: 100px var(--gutter);
    background: var(--purple);
    color: var(--white);
    text-align: center;
}

.join__inner {
    max-width: 760px;
    margin: 0 auto;
}

.join h2 {
    color: var(--white);
}

.join p {
    font-size: 1.25rem;
}

.join__email {
    margin: 2rem 0 3rem;
}

.join__email .btn {
    font-size: 1.25rem;
    padding: 1rem 2.25rem;
}

.join__email .btn:hover {
    background: var(--off-white);
}

.join__apps {
    margin-bottom: 1rem;
    opacity: 0.85;
}

.btn-row--center {
    justify-content: center;
}

/* ---------- Footer ---------- */

.site-footer {
    padding: 100px var(--gutter) 30px;
    background: var(--ink);
    color: var(--white);
}

.site-footer a {
    text-decoration: none;
}

.site-footer__top {
    display: flex;
    align-items: center;
    gap: 20px 40px;
    flex-wrap: wrap;
    padding-bottom: 30px;
}

.site-footer__logo img {
    width: 160px;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    margin-left: auto;
}

.site-footer__links a:hover,
.site-footer__legal a:hover {
    color: var(--green);
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 32px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
}

.site-footer__copyright {
    margin: 0;
    font-family: var(--font-body);
}

.social {
    display: flex;
    gap: 10px;
}

.social__link {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--purple);
    color: var(--green);
}

.social__link:hover {
    background: var(--green);
    color: var(--purple);
}

.social__link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social__link svg[fill='none'] {
    fill: none;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    margin-left: auto;
}

@media (max-width: 760px) {
    .site-footer {
        padding-top: 60px;
    }

    .site-footer__links,
    .site-footer__legal {
        margin-left: 0;
    }
}

/* ---------- Simple pages (404, legal) ---------- */

.simple-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 60px var(--gutter) 120px;
}

.prose-page h1 {
    font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem);
}

.prose-page h2 {
    font-size: 1.5rem;
    margin-top: 2em;
}

.prose-page .prose {
    font-size: 1.0625rem;
}

/* ---------- Imported page building blocks ---------- */

.is-center {
    text-align: center;
}

/* Photo banner at the top of inner pages */
.page-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 190px var(--gutter) 100px;
    background: var(--purple) var(--hero-image) center / cover no-repeat;
    position: relative;
    color: var(--off-white);
    text-align: center;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(24, 24, 24, 0.15), rgba(24, 24, 24, 0.35));
}

.page-hero__inner {
    position: relative;
    max-width: 900px;
}

.page-hero h1 {
    font-size: clamp(2.5rem, 1.6rem + 4vw, 3.75rem);
    color: var(--off-white);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.3);
}

.page-hero .prose {
    font-size: 1.375rem;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.page-hero .btn-wrap {
    margin-top: 1.5rem;
}

.page-hero .btn {
    background: var(--off-white);
    color: var(--purple);
}

.page-hero .btn:hover {
    background: var(--green);
}

.section {
    padding: 100px var(--gutter);
}

.section + .section {
    padding-top: 0;
}

.section--grey,
.section--grey + .section {
    padding-top: 100px;
}

.section--grey {
    background: var(--light-grey);
}

.section__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 28px;
}

.section__inner > h2,
.section__inner > .prose.is-center {
    max-width: 860px;
    justify-self: center;
}

.prose {
    font-size: 1.125rem;
}

.prose > :last-child {
    margin-bottom: 0;
}

.prose a {
    color: var(--purple);
    text-decoration-color: var(--green);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.prose ul,
.prose ol {
    padding-left: 1.4em;
    margin: 0 0 1em;
}

.prose ul {
    list-style: disc;
}

.prose ol {
    list-style: decimal;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1em;
    font-size: 0.95em;
}

.prose th,
.prose td {
    border: 1px solid #ddd6e3;
    padding: 0.5em 0.75em;
    text-align: left;
    vertical-align: top;
}

.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 48px;
    align-items: center;
}

.split__col {
    display: grid;
    gap: 24px;
}

.panel {
    display: grid;
    gap: 24px;
    padding: clamp(32px, 6vw, 80px);
    border-radius: 48px;
}

.panel--green {
    background: var(--green);
}

.panel--purple {
    background: var(--purple);
    color: var(--white);
}

.panel--purple h2,
.panel--purple h3 {
    color: var(--white);
}

.panel--grey {
    background: var(--light-grey);
}

.panel .btn-wrap {
    text-align: center;
}

.figure {
    margin: 0;
}

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

.figure--video video,
.figure--video iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: var(--radius-card);
    background: var(--ink);
}

.btn-wrap {
    margin: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.stat {
    display: grid;
    gap: 6px;
    text-align: center;
}

.stat__value {
    font-family: var(--font-display);
    font-size: clamp(3rem, 2rem + 3vw, 4.5rem);
    font-weight: 600;
    line-height: 1;
    color: var(--purple);
}

.stat__label {
    font-weight: 700;
}

.contact-line {
    margin: 0;
    font-size: 1.125rem;
}

.contact-line a {
    color: var(--purple);
    font-weight: 700;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq {
    border-radius: 12px;
    background: var(--light-grey);
}

.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 56px 18px 24px;
    position: relative;
    font-weight: 700;
}

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

.faq summary::after {
    content: '+';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    line-height: 1;
}

.faq[open] summary::after {
    content: '–';
}

.faq .prose {
    padding: 0 24px 20px;
    font-size: 1rem;
}

.split__col:has(.faq-list) {
    align-self: start;
}

/* Team members on the About page */
.card--team {
    gap: 16px;
    padding: 30px 30px 40px;
    border-radius: 40px;
    background: var(--light-grey);
    color: var(--purple);
}

.card--team h3 {
    color: var(--purple);
}

.card--team .figure img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto;
}

/* ---------- Stile Stories ---------- */

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
    gap: 32px;
}

.post-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--light-grey);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card__link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(68, 51, 85, 0.15);
}

.post-card__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.post-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    padding: 24px 28px 28px;
}

.post-card__date {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.75;
}

.post-card__title {
    margin: 0;
    font-size: 1.625rem;
}

.post-card__excerpt {
    margin: 0;
    font-size: 1rem;
}

.post-card__more {
    margin-top: auto;
    padding-top: 8px;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--green);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* ---------- Single post ---------- */

.post-banner {
    height: clamp(220px, 38vw, 420px);
    background: var(--purple) var(--hero-image) center / cover no-repeat;
}

.post {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px var(--gutter) 100px;
    display: grid;
    gap: 32px;
}

.post__title {
    margin: 0;
    text-align: center;
    font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
}

.post__date {
    margin: -16px 0 0;
    text-align: center;
    font-weight: 700;
    opacity: 0.75;
}

.post .split {
    gap: 24px;
}

/* Long interview text reads better left-aligned (the old site centred it) */
.post .prose.is-center {
    text-align: left;
}

/* Portrait phone photos would otherwise fill the whole screen */
.post .figure img {
    width: auto;
    max-width: 100%;
    max-height: min(75vh, 720px);
    margin: 0 auto;
}

.post .post__featured img {
    max-height: min(80vh, 760px);
}

.post .btn-wrap {
    text-align: center;
}

.share {
    margin-top: 16px;
    padding-top: 32px;
    border-top: 1px solid #ddd6e3;
    text-align: center;
}

.share__title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
}

.share__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.share__list .btn {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
}

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

    .btn {
        transition: none;
    }
}
