/* ============================================
   CINNAMON PUBLISHING — cinnamon.mx
   ============================================ */

/* --- Tokens --- */
:root {
    --bg-deep: #110E0A;
    --bg-surface: #1C1712;
    --bg-elevated: #2A231B;
    --cinnamon: #C4722F;
    --cinnamon-light: #D4944F;
    --amber: #D4A574;
    --cream: #F2E6D9;
    --cream-dim: #A89882;
    --burnt: #8B4513;
    --gold: #C9A96E;
    --white: #FAF6F1;

    --font-heading: "Young Serif", Georgia, serif;
    --font-body: "Bricolage Grotesque", sans-serif;
    --font-mono: "JetBrains Mono", monospace;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--cream);
    background:
        radial-gradient(ellipse at 20% 0%, rgba(196, 114, 47, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 69, 19, 0.06) 0%, transparent 50%),
        var(--bg-deep);
    background-attachment: fixed;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Grain overlay --- */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 0 20px;
    }
}

/* --- Section label (JetBrains Mono) --- */
.section-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cinnamon);
    margin-bottom: 2.5rem;
}

/* --- Links base --- */
a {
    color: var(--cinnamon-light);
    text-decoration: none;
    transition: color 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth);
}

a:hover {
    color: var(--amber);
}

/* ============================================
   ANIMATIONS — Keyframes
   ============================================ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drawIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes scrollDot {
    0%, 100% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(28px);
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Hero load orchestration */
.anim-fade-up {
    animation: fadeUp 0.8s var(--ease-out) backwards;
    animation-delay: var(--delay, 0ms);
}

.anim-draw-in {
    animation: drawIn 0.7s var(--ease-out) backwards;
    animation-delay: var(--delay, 0ms);
}

/* Scroll-triggered reveals */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero__glow {
    position: absolute;
    width: 70vw;
    height: 70vw;
    max-width: 800px;
    max-height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196, 114, 47, 0.07) 0%, transparent 70%);
    top: 10%;
    left: -10%;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

.hero__content {
    position: relative;
    z-index: 1;
    padding: 24px;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 400;
    color: var(--white);
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin-bottom: 1.5rem;
}

.hero__line {
    width: 200px;
    height: 1px;
    background: var(--cinnamon);
    margin: 0 auto 1.5rem;
    transform-origin: center;
}

.hero__tagline {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    font-weight: 300;
    color: var(--cream-dim);
    max-width: 500px;
    margin: 0 auto;
}

/* Scroll indicator */
.hero__scroll {
    margin-top: 4rem;
}

.hero__scroll-track {
    width: 1px;
    height: 40px;
    background: rgba(196, 114, 47, 0.2);
    margin: 0 auto;
    position: relative;
    border-radius: 1px;
    overflow: hidden;
}

.hero__scroll-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cinnamon);
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    animation: scrollDot 2.4s ease-in-out infinite;
}

/* ============================================
   PHILOSOPHY
   ============================================ */

.philosophy {
    padding: 7rem 0;
    border-top: 1px solid rgba(196, 114, 47, 0.1);
}

.philosophy__quote {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.6rem);
    color: var(--white);
    line-height: 1.35;
    margin-bottom: 2rem;
    max-width: 780px;
}

.philosophy__body {
    font-size: 1.05rem;
    color: var(--cream-dim);
    max-width: 600px;
    line-height: 1.75;
}

/* ============================================
   APPS
   ============================================ */

.apps {
    padding: 7rem 0;
    border-top: 1px solid rgba(196, 114, 47, 0.1);
}

.apps__grid {
    display: grid;
    gap: 2rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .apps__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

/* --- App Card --- */
.app-card {
    background: var(--bg-elevated);
    border: 1px solid rgba(196, 114, 47, 0.15);
    border-radius: 18px;
    padding: 2.5rem 2rem;
    transition:
        transform 0.4s var(--ease-out),
        box-shadow 0.4s var(--ease-out),
        border-color 0.4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: rgba(196, 114, 47, 0.35);
    box-shadow: 0 16px 48px rgba(196, 114, 47, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.app-card__icon {
    margin-bottom: 1.8rem;
    height: 80px;
    display: flex;
    align-items: center;
}

.app-card__name {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--white);
    margin-bottom: 0.75rem;
}

.app-card__accent {
    width: 48px;
    height: 3px;
    border-radius: 2px;
    margin-bottom: 1.25rem;
}

.app-card__accent--amber {
    background: var(--amber);
}

.app-card__accent--gold {
    background: var(--gold);
}

.app-card__desc {
    font-size: 0.95rem;
    color: var(--cream-dim);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.app-card__link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--cinnamon-light);
    display: inline-block;
    transition: color 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth);
}

.app-card__link:hover {
    color: var(--amber);
    transform: translateX(4px);
}

/* --- Ryde icon (CSS-only car + motion lines) --- */
.ryde-icon {
    position: relative;
    width: 80px;
    height: 56px;
}

.ryde-icon__road {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.3), transparent);
    border-radius: 1px;
}

.ryde-icon__car {
    position: absolute;
    bottom: 10px;
    left: 18px;
}

.ryde-icon__body {
    width: 40px;
    height: 14px;
    background: var(--cinnamon);
    border-radius: 3px 6px 2px 2px;
    position: relative;
}

.ryde-icon__roof {
    width: 22px;
    height: 10px;
    background: var(--cinnamon-light);
    border-radius: 6px 6px 0 0;
    position: absolute;
    bottom: 14px;
    left: 10px;
}

.ryde-icon__wheel {
    width: 8px;
    height: 8px;
    background: var(--cream-dim);
    border-radius: 50%;
    position: absolute;
    bottom: -4px;
}

.ryde-icon__wheel--front {
    right: 4px;
}

.ryde-icon__wheel--rear {
    left: 2px;
}

.ryde-icon__lines {
    position: absolute;
    left: -2px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ryde-icon__lines span {
    display: block;
    height: 1.5px;
    border-radius: 1px;
    background: rgba(196, 114, 47, 0.4);
}

.ryde-icon__lines span:nth-child(1) {
    width: 14px;
}

.ryde-icon__lines span:nth-child(2) {
    width: 10px;
}

.ryde-icon__lines span:nth-child(3) {
    width: 6px;
}

/* --- MoiraFinance icon (CSS/SVG pie) --- */
.moira-icon {
    width: 80px;
    height: 80px;
    animation: float 7s ease-in-out infinite;
}

.moira-icon__pie {
    width: 100%;
    height: 100%;
}

/* ============================================
   VALUES
   ============================================ */

.values {
    padding: 7rem 0;
    border-top: 1px solid rgba(196, 114, 47, 0.1);
}

.values__grid {
    display: grid;
    gap: 3rem;
}

@media (min-width: 768px) {
    .values__grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2.5rem;
    }
}

.value-item {
    position: relative;
}

.value-item__number {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: rgba(196, 114, 47, 0.2);
    line-height: 1;
    display: block;
    margin-bottom: 1rem;
}

.value-item__title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.value-item__desc {
    font-size: 0.92rem;
    color: var(--cream-dim);
    line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    padding: 3.5rem 0;
    border-top: 1px solid rgba(196, 114, 47, 0.1);
}

.footer .container {
    text-align: center;
}

.footer__name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--cream-dim);
    display: block;
    margin-bottom: 0.5rem;
}

.footer__copy {
    font-size: 0.82rem;
    color: rgba(168, 152, 130, 0.6);
    margin-bottom: 1.25rem;
}

.footer__links {
    display: flex;
    justify-content: center;
    gap: 1.75rem;
}

.footer__links a {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--cream-dim);
    transition: color 0.3s var(--ease-smooth);
}

.footer__links a:hover {
    color: var(--cinnamon-light);
}

/* ============================================
   RESPONSIVE — MOBILE REFINEMENTS
   ============================================ */

@media (max-width: 767px) {
    .hero__title {
        letter-spacing: -0.02em;
    }

    .philosophy {
        padding: 5rem 0;
    }

    .apps {
        padding: 5rem 0;
    }

    .app-card {
        padding: 2rem 1.5rem;
    }

    .values {
        padding: 5rem 0;
    }

    .value-item + .value-item {
        padding-top: 2rem;
        border-top: 1px solid rgba(196, 114, 47, 0.07);
    }
}

/* ============================================
   LARGE SCREENS
   ============================================ */

@media (min-width: 1200px) {
    .philosophy__quote {
        font-size: 2.6rem;
    }

    .apps__grid {
        gap: 3rem;
    }

    .app-card {
        padding: 3rem 2.5rem;
    }
}
