/* --- 1. BASE & UTILITIES --- */
:root {
    --primary-color: #333333; 
    --accent-color: #D4AF37;  
    --background-light: #ffffff;
    --background-dark: #f5f5f5; 
    --text-dark: #333333;
    --text-light: #666666;
    --font-family: 'Inter', 'Helvetica Neue', sans-serif;
    --border-radius: 6px;
    --copy-size: 1.15rem;
    --spacing-lg: 60px;
    --spacing-md: 30px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

/* Offset anchor jumps to account for sticky header */
section[id] { scroll-margin-top: 90px; }


body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    margin-bottom: 0.5em;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-color);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }

/* --- 2. HEADER & NAVIGATION --- */
.header {
    position: sticky;
    top: 0;
    background-color: var(--background-light);
    border-bottom: 1px solid #eeeeee;
    padding: 15px 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--primary-color);
}

.logo img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.nav a {
    margin-left: 25px;
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--primary-color);
}

.button {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease; 
    display: inline-block;
}

.button:hover {
    transform: translateY(-2px); 
    opacity: 0.9;
}

.primary-cta, .hero-cta {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.primary-cta:hover, .hero-cta:hover {
    background-color: #1a1a1a;
}

/* --- 3. HERO SECTION & DEVICE MOCKUP --- */
.hero-section {
    padding: 40px 0 80px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: clamp(20px, 4vw, 56px);
    width: calc(100% - 40px);
    padding: clamp(28px, 5vw, 60px);
    position: relative;
    background-color: var(--background-dark);
    border: 1px solid #e5e5e5;
    border-radius: 44px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.highlight-features {
    display: grid;
    gap: 4px;
    color: var(--accent-color);
    font-size: var(--copy-size);
    margin-top: 10px;
}

.text-content {
    flex: 1;
}

.subtitle {
    margin-bottom: var(--spacing-md);
    max-width: 500px;
}

.cta-group {
    display: inline-block;
    margin-top: 20px;
    text-align: center;
}

.hero-cta {
    font-size: 1.1rem;
    padding: 12px 30px;
}

.hero-qr {
    position: absolute;
    inset: auto 28px 24px auto;
    z-index: 30;
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.15);
    color: var(--text-dark);
    font: 700 0.75rem/1.2 var(--font-family);
    text-align: center;
    text-decoration: none;
}

.trust-icons {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.mockup-content {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: -42px;
    position: relative;
}

.device-wrapper {
    background: #000;
    border: 12px solid #000;
    position: relative;
    height: auto;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.screen-slot {
    width: 100%;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.screen-slot img {
    display: block;
    width: 100%;
    height: auto; 
    z-index: 2;
}

.placeholder-content {
    position: absolute;
    color: #444;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    z-index: 1;
}

.device-wrapper.phone {
    width: 185px;
    border-radius: 32px;
    position: absolute;
    bottom: -25px;
    right: -50px;
    z-index: 3;
    border-width: 9px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.28);
}

.device-wrapper.phone .screen-slot {
    min-height: auto;
}

.device-wrapper.tablet { width: min(44%, 520px); z-index: 4; border-width: 12px; border-radius: 22px; box-shadow: none; }
.device-wrapper.tablet .screen-slot { aspect-ratio: 2388 / 1668; overflow: hidden; }
.device-wrapper.tablet img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* iPhone XR Notch Overlay */
.device-wrapper.phone::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 57%;
    aspect-ratio: 10 / 1.5;
    background: #000;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    z-index: 10;
}

.hero-phone {
    margin-bottom: -355px;
}

.hero-phone .device-wrapper.phone {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(410px, 72vw);
    border-width: clamp(15px, 3.6vw, 21px);
    border-radius: 17% / 8%;
    transform: none;
}

.hero-phone .device-wrapper.phone .screen-slot {
    aspect-ratio: 1290 / 2796;
    overflow: hidden;
}

.hero-phone .device-wrapper.phone::before {
    border-bottom-left-radius: clamp(14px, 3vw, 23px);
    border-bottom-right-radius: clamp(14px, 3vw, 23px);
}

.hero-phone .device-wrapper.phone:hover {
    box-shadow: 0 60px 120px rgba(0,0,0,0.25);
}

@media (hover: hover) and (pointer: fine) {
  .hero-phone .device-wrapper.phone:hover,
  .download-buttons a:hover img,
  .download-buttons span:hover img,
  .download-buttons a:focus-visible img {
    transform: translateY(-3px);
    z-index: 20;
  }

  .mission-story figcaption:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.2);
  }
}

/* --- 4. SECTION STYLES (GENERAL) --- */
section {
    padding: var(--spacing-lg) 0;
}

.mission-section { padding: 70px 0 25px; text-align: center; }
.mission-section::after { content: ""; display: block; width: min(160px, 34vw); height: 1px; margin: 34px auto 0; border-radius: 999px; background: var(--text-light); }

.subtitle,
.mission-text,
.mission-story p {
    font-size: var(--copy-size);
    font-weight: 500;
}

.subtitle,
.mission-story p {
    color: var(--text-light);
}

.mission-text {
    max-width: 800px;
    margin: 20px auto 0;
    color: var(--text-dark);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding-top: var(--spacing-md);
}

.story-section { padding-top: 35px; }

.mission-stories { display: grid; gap: 96px; }

.mission-story { align-items: center; gap: clamp(80px, 10vw, 140px); padding-top: 0; }
.mission-story:nth-child(even) figure { order: 2; justify-self: end; }
.mission-story figure { position: relative; width: 100%; max-width: 560px; }
.mission-story > div { max-width: 520px; }

.story-slot,
.mission-story figcaption {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f2;
    overflow: hidden;
    position: relative;
}

.story-slot {
    aspect-ratio: 4 / 3;
    border: 10px solid #fff;
    border-radius: 36px;
}

.mission-story figcaption {
    position: absolute;
    top: 25%;
    right: -18%;
    width: min(76%, 340px);
    aspect-ratio: 680 / 420;
    background: #050505;
    border-inline: 16px solid #050505;
    border-radius: 0;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 3;
}

.mission-story:nth-child(even) figcaption { right: auto; left: -18%; }

.story-slot::after,
.mission-story figcaption::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--shot) center var(--shot-y, center) / cover no-repeat;
    z-index: 2;
}

.mission-story .placeholder-content {
    color: #777;
    position: relative;
    text-align: center;
    line-height: 1.4;
}

.features-section .container > h2 {
    text-align: center;
    margin-bottom: 1rem;
}

/* --- 6. FEATURES --- */
.features-section {
    background-color: var(--background-dark);
}

.features-showcase {
    align-items: stretch;
    grid-template-columns: minmax(0, 0.9fr) minmax(560px, 1.1fr);
}

.features-photo {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 420px;
    display: flex;
    position: relative;
    justify-content: flex-start;
    padding: 42px;
}

.features-list {
    display: grid; grid-auto-rows: 1fr;
    align-content: center;
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-self: end;
    z-index: 4;
    width: min(100%, 660px);
    gap: 12px;
}

.feature-item {
    background-color: #f7f7f7;
    border: 1px solid #e0eeef;
    border-radius: 8px;
    padding: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item:hover,
.features-photo .device-wrapper.tablet:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-item .icon, .feature-item h3 { font-size: 1rem; vertical-align: middle; }

.feature-item .icon {
    display: inline-block;
    margin-right: 6px;
}

.feature-item h3 { display: inline; }
.feature-item p { line-height: 1.45; }

/* --- 7. REVIEWS --- */
.review-next {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border: 1px solid #e0eeef;
    border-radius: 50%;
    background: var(--background-dark);
    color: var(--text-dark);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.review-next::before {
    content: "";
    width: 11px;
    height: 11px;
    border: solid currentColor;
    border-width: 2px 2px 0 0;
    transform: translateX(-2px) rotate(45deg);
}

.review-next:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.review-stage {
    max-width: 700px;
    margin: 20px auto 0;
    overflow: hidden;
    position: relative;
}

.testimonial {
    font-size: 1.4rem;
    line-height: 1.4;
    text-align: left;
}

.review-out {
    position: absolute;
    inset: 0;
}

.testimonial footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
}

.testimonial cite {
    font-style: normal;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
}

/* --- 8. FINAL CTA & DOWNLOAD --- */
.download-section {
    text-align: center;
    padding: 80px 0;
}

.download-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.download-buttons img,
.store-soon {
    display: block;
    height: 84px;
    width: 251px;
}

.download-buttons img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.store-soon {
    display: grid;
    place-items: center;
    border: 2px solid #a6a6a6;
    border-radius: 12px;
    background-color: #000;
    color: white;
    font-weight: 400;
}

/* --- 9. FOOTER --- */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    font-size: 1.0rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
}

.ecosystem-note a {
    color: var(--primary-color);
    font-weight: 700;
}

.footer-links a:not(:last-child)::after {
    content: "|";
    margin-left: 20px;
    opacity: 0.2;
}

/* --- 10. RESPONSIVENESS --- */
@media (max-width: 1100px) {
    .features-showcase { grid-template-columns: 1fr; }
    .features-list { grid-column: 1; grid-row: 1; justify-self: stretch; width: 100%; }
    .features-photo { grid-row: 2; min-height: auto; justify-content: center; padding: 24px 0 0; }
    .features-photo .device-wrapper.tablet { width: min(100%, 720px); }
}

@media (max-width: 800px) {
    h1 { font-size: clamp(2rem, 10vw, 2.5rem); }
    .nav a { display: none; }
    .nav a:last-child { display: inline; margin-left: 0; }
    .primary-cta { padding: 8px 12px; white-space: nowrap; }
    .highlight-features { display: flex; justify-content: center; gap: clamp(4px, 1.8vw, 14px); font-size: clamp(.72rem, 3.2vw, .95rem); white-space: nowrap; }
    .hero-section { padding: 24px 0 50px; }
    .hero-content { flex-direction: column; text-align: center; width: auto; margin-inline: 20px; padding: 28px 20px 34px; }
    .mockup-content {
        margin-top: 8px;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .hero-phone {
        margin-bottom: -230px;
    }

    .hero-phone .device-wrapper.phone {
        width: min(76vw, 305px);
    }

    .hero-cta { display: block; width: 100%; margin: 10px 0; }
    .hero-qr { display: none; }
    .grid-2 { grid-template-columns: 1fr; }
    .mission-section { padding: 50px 0; }
    .mission-stories { gap: 64px; }
    .mission-story:nth-child(even) figure { order: 0; justify-self: stretch; }
    .mission-story > div { order: -1; max-width: none; }
    .mission-story figcaption,
    .mission-story:nth-child(even) figcaption {
        position: relative;
        inset: auto;
        width: calc(100% - 30px);
        margin: -52px auto 0;
    }
    .mission-story { text-align: center; }
    .features-list { grid-row: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .download-buttons { gap: 8px; }
    .download-buttons img, .store-soon { height: 58px; width: 174px; }
    .footer-content { flex-direction: column; text-align: center; gap: 10px; }
}

@media (max-width: 520px) {
    .logo span { display: none; }
}

/* Ensure legal pages use the same button styling */
.download-footer .button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
}
