/* ABOUTME: Core styles for ThirstTrapp landing page - gradients, typography, and layout foundation */
/* ABOUTME: Includes CSS reset, base styling, header navigation, and responsive framework */

/* ===================================
   CSS RESET & BASE STYLES
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ===================================
   TODO MARKERS - REMOVE BEFORE LAUNCH
   =================================== */

.todo-marker {
    color: #FF0000;
    font-weight: 700;
    font-size: 0.875rem;
    background: #FFE6E6;
    padding: 0.25rem 0.5rem;
    border: 2px solid #FF0000;
    border-radius: 4px;
    display: inline-block;
    margin-left: 0.5rem;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.5; }
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

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

    body {
        animation: none;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1A1A3E;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    /* Gradient background: cyan to cream/beige */
    background: linear-gradient(180deg, #E0F7FF 0%, #FFF8F0 100%);
    background-attachment: fixed;

    /* Smooth page load */
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1A1A3E;
    margin-bottom: 1.5rem;
}

p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #4A4A6A;
    margin-bottom: 2rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

/* Focus states for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid #000000;
    outline-offset: 4px;
    opacity: 1;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 4px;
}

/* Remove focus outline on mouse click, keep for keyboard */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* ===================================
   HEADER
   =================================== */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    width: 100%;
    position: relative;
}

/* Logo + App Name - Clickable Unit */
.logo-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo-brand:hover {
    opacity: 0.8;
}

.logo-brand img {
    display: block;
    border-radius: 12px;
}

.app-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1A1A3E;
    letter-spacing: -0.02em;
}

/* Burger Menu - Hidden on Desktop */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: #1A1A3E;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-menu:hover span {
    background: #000000;
}

/* Burger menu animation when open */
.menu-open .burger-menu span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.menu-open .burger-menu span:nth-child(2) {
    opacity: 0;
}

.menu-open .burger-menu span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #4A4A6A;
}

nav a {
    font-weight: 500;
    padding: 0.5rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

nav .divider {
    color: #D0D0D0;
}

/* Hide nav logo by default (desktop) */
.nav-logo {
    display: none;
}

/* Mobile Header Styles */
@media (max-width: 767px) {
    header {
        padding: 1rem 1.5rem;
    }

    .app-name {
        font-size: 1.25rem;
    }

    .logo-brand img {
        width: 40px;
        height: 40px;
    }

    /* Show burger menu on mobile */
    .burger-menu {
        display: flex;
    }

    /* Hide nav by default on mobile */
    nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        gap: 2rem;
        opacity: 0;
        visibility: hidden;
        transform: scale(0.95);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
        z-index: 1000;
    }

    /* Show nav when menu is open */
    .menu-open nav {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }

    /* Show logo in mobile menu */
    nav .nav-logo {
        display: flex;
        margin-bottom: 1rem;
    }

    nav a {
        font-size: 1.125rem;
        padding: 0.75rem;
        width: 100%;
        justify-content: center;
    }

    nav .divider {
        display: none;
    }
}

/* ===================================
   MAIN LAYOUT
   =================================== */

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 2rem;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    /* Mobile-first: Stack vertically */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 0;
}

/* iPhone mockup container */
.phone-container {
    width: 100%;
    max-width: 320px;
    display: flex;
    justify-content: center;
    align-items: center;

    /* Drop shadow for depth */
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
}

/* Content text section */
.content-text {
    text-align: center;
    max-width: 600px;
}

/* Headline styling */
.headline {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1A1A3E;
    margin-bottom: 1.5rem;
    min-height: 6rem;
}

/* Tilted background box for emphasis */
.tilted-box {
    display: inline-block;
    background: rgba(173, 216, 230, 0.6);
    padding: 0.3rem 0.8rem;
    transform: rotate(-2deg);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Rotating text - container for animated words */
.rotating-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #000000;
    position: relative;
    transition: color 0.3s ease;
}

/* Icon-only mode (for X) */
.rotating-text.icon-only {
    gap: 0;
}

/* Rotating icon */
.rotating-icon {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    display: inline-block;
    transition: opacity 0.3s ease;
}

/* Desktop icon size */
@media (min-width: 1024px) {
    .rotating-icon {
        width: 3rem;
        height: 3rem;
    }
}

/* Mobile icon size */
@media (max-width: 768px) {
    .rotating-icon {
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 480px) {
    .rotating-icon {
        width: 1.75rem;
        height: 1.75rem;
    }
}

/* Flip animation for rotating text */
.rotating-text.flip {
    animation: flip 0.6s ease-in-out;
    will-change: transform, opacity;
}

@keyframes flip {
    0% {
        transform: rotateX(0deg);
        opacity: 1;
    }
    50% {
        transform: rotateX(90deg);
        opacity: 0;
    }
    100% {
        transform: rotateX(0deg);
        opacity: 1;
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .rotating-text.flip {
        animation: none;
    }
}

/* Subheadline styling */
.subheadline {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.6;
    color: #4A4A6A;
    margin-bottom: 2.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* App Store link and badge */
.app-store-link {
    display: inline-block;
    transition: transform 0.2s ease;
}

.app-store-link:hover {
    transform: scale(1.05);
    opacity: 1;
}

.app-store-badge {
    width: 180px;
    height: auto;
    display: block;
}

/* Desktop adjustments for text */
@media (min-width: 1024px) {
    .headline {
        font-size: 3.5rem;
        min-height: 8.4rem;
    }

    .subheadline {
        font-size: 1.25rem;
        margin-left: 0;
        margin-right: 0;
    }

    .app-store-badge {
        width: 200px;
    }
}

/* Mobile adjustments for text */
@media (max-width: 768px) {
    .headline {
        font-size: 2.5rem;
    }

    .subheadline {
        font-size: 1.125rem;
    }

    .app-store-badge {
        width: 180px;
    }
}

@media (max-width: 480px) {
    .headline {
        font-size: 2.25rem;
        min-height: 5.4rem;
    }

    .subheadline {
        font-size: 1rem;
    }
}

/* Desktop layout: Side by side */
@media (min-width: 1024px) {
    .hero-content {
        flex-direction: row;
        align-items: center;
        gap: 5rem;
        padding: 3rem 2rem;
    }

    .phone-container {
        max-width: 400px;
        flex: 0 0 auto;
    }

    .content-text {
        flex: 1;
        text-align: left;
        max-width: 550px;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .phone-container {
        max-width: 350px;
    }
}

/* Mobile layout adjustments */
@media (max-width: 768px) {
    main {
        justify-content: flex-start;
        padding: 0 1.5rem;
    }

    .hero-content {
        justify-content: flex-start;
        gap: 2rem;
        padding: 2rem 0;
    }

    /* Reorder: Text first, then phone */
    .content-text {
        order: 1;
    }

    .phone-container {
        order: 2;
    }

    /* Mobile spacing */
    .headline {
        margin-bottom: 1.25rem;
    }

    .subheadline {
        margin-bottom: 2rem;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    main {
        padding: 0 1rem;
    }

    .hero-content {
        justify-content: flex-start;
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .headline {
        margin-bottom: 1rem;
    }

    .subheadline {
        margin-bottom: 1.5rem;
    }
}

/* ===================================
   IPHONE 14 MOCKUP
   =================================== */

.device-iphone-14 {
    height: 868px;
    width: 428px;
    position: relative;
}

.device-frame {
    background: #010101;
    border: 1px solid #0f1214;
    border-radius: 68px;
    box-shadow: inset 0 0 4px 2px #9fa0a2, inset 0 0 0 6px #272C31;
    height: 868px;
    padding: 19px;
    width: 428px;
}

/* Screen area - 2532‑by‑1170-pixel resolution */
.device-screen {
    border-radius: 49px;
    height: 830px;
    width: 390px;
    overflow: hidden;
    position: relative;
    background: #000;
}

/* Ensure all screen content respects rounded corners */
.device-screen > * {
    border-radius: inherit;
}

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

/* Antenna stripes - COMMENTED OUT: Visible as gray squares
.device-stripe::after,
.device-stripe::before {
    border: solid rgba(1, 1, 1, 0.25);
    border-width: 0 7px;
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    width: 100%;
    z-index: 9;
}

.device-stripe::after {
    top: 85px;
}

.device-stripe::before {
    bottom: 85px;
}
*/

/* Dynamic Island notch - COMMENTED OUT: Video already shows pill/notch
.device-header {
    background: #010101;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    height: 30px;
    left: 50%;
    margin-left: -80px;
    position: absolute;
    top: 20px;
    width: 160px;
    z-index: 10;
}

.device-header::after,
.device-header::before {
    content: "";
    height: 10px;
    position: absolute;
    top: 0;
    width: 10px;
}

.device-header::after {
    background: radial-gradient(circle at bottom left, transparent 0, transparent 75%, #010101 75%, #010101 100%);
    left: -10px;
}

.device-header::before {
    background: radial-gradient(circle at bottom right, transparent 0, transparent 75%, #010101 75%, #010101 100%);
    right: -10px;
}
*/

/* Camera and sensors - COMMENTED OUT: Video already shows pill/notch
.device-sensors::after,
.device-sensors::before {
    content: "";
    position: absolute;
}

.device-sensors::after {
    background: #151619;
    border: 1px solid #010101;
    border-radius: 4px;
    box-shadow: 0 0 4px #151619;
    height: 7px;
    left: 50%;
    margin-left: -35px;
    top: 8px;
    width: 70px;
}

.device-sensors::before {
    background: radial-gradient(farthest-corner at 20% 20%, #6074BF 0, transparent 40%),
                radial-gradient(farthest-corner at 80% 80%, #513785 0, #24555E 20%, transparent 50%);
    box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    height: 9px;
    left: 50%;
    margin-left: -60px;
    top: 26px;
    width: 9px;
}
*/

/* Volume buttons (left side) */
.device-btns {
    background: #0f1214;
    border-radius: 2px;
    height: 32px;
    left: -2px;
    position: absolute;
    top: 115px;
    width: 3px;
}

.device-btns::after,
.device-btns::before {
    background: #0f1214;
    border-radius: 2px;
    content: "";
    height: 62px;
    left: 0;
    position: absolute;
    width: 3px;
}

.device-btns::after {
    top: 60px;
}

.device-btns::before {
    top: 140px;
}

/* Power button (right side) */
.device-power {
    background: #0f1214;
    border-radius: 2px;
    height: 100px;
    right: -2px;
    position: absolute;
    top: 200px;
    width: 3px;
}

/* Bottom antenna bands - COMMENTED OUT: Visible as gray squares
.device-home::after,
.device-home::before {
    border: solid rgba(1, 1, 1, 0.25);
    border-width: 6px 0;
    content: "";
    height: 6px;
    position: absolute;
    width: 6px;
    z-index: 9;
}

.device-home::after {
    right: 86px;
    top: 0;
}

.device-home::before {
    bottom: 0;
    left: 86px;
}
*/

/* Native responsive sizing - actual dimensions */
@media (max-width: 768px) {
    .device-iphone-14 {
        height: 651px;  /* 868px * 0.75 */
        width: 321px;   /* 428px * 0.75 */
    }

    .device-frame {
        height: 651px;
        width: 321px;
        border-radius: 51px;  /* 68px * 0.75 */
        padding: 14.25px;     /* 19px * 0.75 */
    }

    .device-screen {
        height: 622.5px;  /* 830px * 0.75 */
        width: 292.5px;   /* 390px * 0.75 */
        border-radius: 36.75px;  /* 49px * 0.75 */
    }

    .device-btns {
        height: 24px;   /* 32px * 0.75 */
        top: 86.25px;   /* 115px * 0.75 */
        width: 2.25px;  /* 3px * 0.75 */
    }

    .device-btns::after,
    .device-btns::before {
        height: 46.5px;  /* 62px * 0.75 */
        width: 2.25px;   /* 3px * 0.75 */
    }

    .device-btns::after {
        top: 45px;  /* 60px * 0.75 */
    }

    .device-btns::before {
        top: 105px;  /* 140px * 0.75 */
    }

    .device-power {
        height: 75px;   /* 100px * 0.75 */
        top: 150px;     /* 200px * 0.75 */
        width: 2.25px;  /* 3px * 0.75 */
    }
}

@media (max-width: 480px) {
    .device-iphone-14 {
        height: 564px;  /* 868px * 0.65 */
        width: 278px;   /* 428px * 0.65 */
    }

    .device-frame {
        height: 564px;
        width: 278px;
        border-radius: 44.2px;  /* 68px * 0.65 */
        padding: 12.35px;       /* 19px * 0.65 */
    }

    .device-screen {
        height: 539.5px;  /* 830px * 0.65 */
        width: 253.5px;   /* 390px * 0.65 */
        border-radius: 31.85px;  /* 49px * 0.65 */
    }

    .device-btns {
        height: 20.8px;   /* 32px * 0.65 */
        top: 74.75px;     /* 115px * 0.65 */
        width: 1.95px;    /* 3px * 0.65 */
    }

    .device-btns::after,
    .device-btns::before {
        height: 40.3px;   /* 62px * 0.65 */
        width: 1.95px;    /* 3px * 0.65 */
    }

    .device-btns::after {
        top: 39px;  /* 60px * 0.65 */
    }

    .device-btns::before {
        top: 91px;  /* 140px * 0.65 */
    }

    .device-power {
        height: 65px;    /* 100px * 0.65 */
        top: 130px;      /* 200px * 0.65 */
        width: 1.95px;   /* 3px * 0.65 */
    }
}

/* ===================================
   RESPONSIVE TYPOGRAPHY
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    h1 {
        font-size: 2.5rem;
    }

    p {
        font-size: 1.125rem;
    }

    header {
        padding: 1.25rem 2rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    p {
        font-size: 1rem;
    }

    header {
        padding: 1rem 1.5rem;
    }

    .logo img {
        width: 40px;
        height: 40px;
    }

    nav {
        font-size: 0.875rem;
    }

    main {
        padding: 0 1.5rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    header {
        padding: 1rem;
    }
}
