/* replyTLDR - Refined from Ground Up */

:root {
    --bg: #FAF7F2;
    --text: #222;
    --text-muted: #666;
    --accent: #8B7355;
    --accent-hover: #6B5345;
    --white: #FFFFFF;
    --border: #E8E0D5;
    --shadow: rgba(139, 115, 85, 0.08);
    --shadow-lg: rgba(139, 115, 85, 0.12);
    --glow: rgba(139, 115, 85, 0.06);
}

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

body {
    font-family: Georgia, serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.logo h1 {
    font-size: 18px;
    font-weight: normal;
}

.logo a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.logo a:hover {
    color: var(--accent);
}

.attribution {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.attribution a {
    color: var(--accent);
    text-decoration: none;
}

.attribution a:hover {
    text-decoration: underline;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav a {
    padding: 10px 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}

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

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.sidebar-footer .tagline {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Main */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.breadcrumb {
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .current {
    color: var(--text);
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px;
    width: 100%;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 48px;
}

.hero h1 {
    font-size: 40px;
    font-weight: normal;
    margin-bottom: 12px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.phone-display {
    margin-bottom: 16px;
}

.phone {
    font-family: 'Courier New', monospace;
    font-size: 48px;
    font-weight: bold;
    letter-spacing: 0.02em;
    color: var(--text);
    background: linear-gradient(135deg, var(--white) 0%, rgba(250, 247, 242, 0.4) 100%);
    padding: 20px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px var(--shadow),
                0 0 0 1px var(--border);
}

.phone:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--shadow-lg),
                0 0 0 1px var(--accent);
}

.phone.copied {
    background: linear-gradient(135deg, #E8DCC8 0%, #F0E6D8 100%);
}

.actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 14px;
}

.action-link {
    background: none;
    border: none;
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
    font-family: Georgia, serif;
    transition: color 0.2s;
}

.action-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.rates-text {
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.5;
    font-style: italic;
}

.rates-notice-hero {
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.5;
    font-style: italic;
    text-align: center;
    margin-top: 12px;
}

.sep {
    color: var(--border);
}

/* Section Spacing */
section {
    margin-bottom: 48px;
}

h2 {
    font-size: 22px;
    font-weight: normal;
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

/* How it Works + Demo Side by Side */
.how-demo-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.how-side h2,
.demo-side h2 {
    text-align: left;
    margin-bottom: 20px;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.step {
    background: var(--white);
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 1px 6px var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(139, 115, 85, 0.2);
}

.step p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    margin: 0;
}

.step strong {
    color: var(--text);
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Demo */
.demo-container {
    max-width: 100%;
}

.phone-frame {
    background: var(--white);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 2px 16px var(--shadow);
    margin-bottom: 12px;
    min-height: 320px;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.demo-set {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.demo-set.hidden {
    display: none;
}

.msg {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
}

.msg-sent {
    background: #007AFF;
    color: var(--white);
    margin-left: auto;
    align-self: flex-end;
}

.msg-sent p {
    margin: 0;
    font-size: 14px;
    word-break: break-all;
}

.msg-received {
    background: #E8DCC8;
    color: var(--text);
    align-self: flex-start;
}

.msg-received strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
}

.msg-received p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
}

.msg-typing {
    background: #E8DCC8;
    padding: 12px 16px;
    border-radius: 18px;
    width: 68px;
    display: flex;
    gap: 5px;
    align-self: flex-start;
}

.msg-typing.hidden {
    display: none;
}

.msg-typing span {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

.msg-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.msg-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

.demo-btn {
    width: 100%;
    padding: 12px 24px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: Georgia, serif;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.demo-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.demo-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Story */
.story {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.story h2 {
    text-align: center;
}

.story-note {
    background: var(--white);
    border-left: 3px solid var(--accent);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 8px var(--shadow);
}

.story-note p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-align: left;
}

.story-note p:last-of-type {
    margin-bottom: 16px;
}

.signature {
    font-style: italic;
    color: var(--accent);
    text-align: right !important;
    margin-bottom: 0 !important;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--white);
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 1px 6px var(--shadow);
    transition: box-shadow 0.2s;
}

.faq-item[open] {
    box-shadow: 0 2px 10px var(--shadow-lg);
}

.faq-item summary {
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    color: var(--text);
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
}

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

.faq-item summary::before {
    content: '+';
    font-size: 18px;
    color: var(--accent);
    margin-right: 10px;
    font-weight: normal;
    width: 18px;
    text-align: center;
}

.faq-item[open] summary::before {
    content: '−';
}

.faq-item summary:hover {
    color: var(--accent);
}

.faq-item p {
    margin-top: 10px;
    padding-left: 28px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.stat-item {
    font-size: 13px;
}

.stat-divider {
    color: var(--border);
}

/* Footer */
.footer {
    padding: 32px 0 48px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.footer a {
    color: var(--text-muted);
    text-decoration: underline;
}

.footer a:hover {
    color: var(--accent);
}

/* Mobile Header - Hidden on Desktop */
.mobile-header {
    display: none;
}

.mobile-menu-overlay {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    /* Mobile Header */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: 60px;
    }

    .hamburger-btn {
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        display: flex;
        flex-direction: column;
        gap: 5px;
        z-index: 1001;
    }

    .hamburger-btn span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--accent);
        transition: all 0.3s ease;
    }

    .hamburger-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .mobile-logo {
        display: flex;
        align-items: center;
        gap: 8px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .mobile-logo img {
        width: 24px;
        height: 24px;
        border-radius: 4px;
    }

    .mobile-logo span {
        font-size: 16px;
        font-weight: normal;
        color: var(--text);
    }

    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Sidebar becomes slide-in menu on mobile */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
        border-right: 1px solid var(--border);
        border-bottom: none;
        padding: 32px 24px;
        background: var(--bg);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-nav {
        display: flex !important;
        flex-direction: column;
    }

    .sidebar-footer {
        display: block !important;
    }

    .layout {
        flex-direction: column;
    }

    .logo {
        margin-bottom: 8px;
    }

    .attribution {
        margin-bottom: 24px;
    }

    .main-content {
        margin-top: 60px;
    }

    .container {
        padding: 32px 20px;
    }

    .hero {
        margin-bottom: 32px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero .subtitle {
        margin-bottom: 32px;
    }

    .phone {
        font-size: 36px;
        padding: 14px 20px;
    }

    .actions {
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .action-link {
        font-size: 14px;
    }

    .sep {
        display: inline;
    }

    .stat-divider {
        display: inline;
        color: var(--border);
    }

    .stats {
        flex-direction: row;
        gap: 12px;
        font-size: 12px;
        padding: 20px 0;
    }

    .stat-item {
        font-size: 12px;
    }

    .how-demo-section {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .demo-side {
        order: 2;
    }

    .how-side {
        order: 1;
    }

    .how-side h2,
    .demo-side h2 {
        text-align: center;
        font-size: 20px;
    }

    .step {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 16px;
        padding: 14px 16px;
    }

    .step-num {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .step p {
        font-size: 13px;
    }

    .step strong {
        font-size: 12px;
    }

    .phone-frame {
        padding: 20px 16px;
        min-height: 260px;
    }

    .msg {
        max-width: 90%;
    }

    .msg-sent p {
        font-size: 13px;
    }

    .msg-received strong {
        font-size: 14px;
    }

    .msg-received p {
        font-size: 13px;
    }

    .demo-btn {
        margin-top: 0;
        font-size: 14px;
    }

    .steps {
        margin-bottom: 16px;
    }
}
