:root {
    --green: #00DC82;
    --green-dark: #00b368;
    --green-glow: rgba(0, 220, 130, 0.15);
    --black: #0a0a0a;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --purple: #AB9FF2;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--gray-900);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-100);
}

.logo {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--gray-900);
    text-decoration: none;
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.15s;
}

nav a:hover,
nav a.active {
    color: var(--gray-900);
}

/* Hero Section - Side by Side */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 6rem 4rem;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hat-visual {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hat-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.hat-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80%;
    height: 80%;
    background: var(--gray-100);
    border-radius: 12px;
    border: 2px dashed var(--gray-300);
}

.hat-placeholder::after {
    content: 'Add hat.png to /public/images/';
    font-size: 0.75rem;
    color: var(--gray-400);
    text-align: center;
    padding: 1rem;
}

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.hero-right h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--gray-900);
}

.thesis {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--gray-600);
    max-width: 480px;
}

.token-ca {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    border-radius: 8px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.ca-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ca-address {
    font-size: 0.8rem;
    color: var(--gray-700);
    word-break: break-all;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    background: var(--gray-900);
    color: var(--white);
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-left: auto;
}

.copy-btn:hover {
    background: var(--gray-700);
}

.price-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.price-tag {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.price {
    font-size: 2rem;
    font-weight: 600;
    color: var(--gray-900);
}

.currency {
    font-size: 1rem;
    color: var(--gray-500);
    font-weight: 500;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    background: var(--gray-900);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.cta-btn:hover {
    background: var(--black);
}

/* Order Section */
.order-section {
    padding: 6rem 2rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.order-container {
    max-width: 600px;
    margin: 0 auto;
}

.order-header {
    text-align: center;
    margin-bottom: 3rem;
}

.order-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.order-header p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.form-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.form-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group.small {
    flex: 0 0 130px;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
}

input {
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: var(--white);
    transition: all 0.15s ease;
}

input:hover {
    border-color: var(--gray-300);
}

input:focus {
    outline: none;
    border-color: var(--gray-900);
}

input::placeholder {
    color: var(--gray-400);
}

/* Payment Section */
.payment-section {
    display: flex;
    flex-direction: column;
}

.payment-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 1.5rem;
}

.payment-summary span:first-child {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.total-price {
    font-size: 1.25rem;
    font-weight: 600;
}

.wallet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    background: var(--white);
    color: var(--gray-900);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 1rem;
}

.wallet-btn:hover {
    border-color: var(--purple);
    background: rgba(171, 159, 242, 0.05);
}

.wallet-btn.connected {
    border-color: var(--green);
    background: rgba(0, 220, 130, 0.05);
}

.wallet-btn svg {
    flex-shrink: 0;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    background: var(--gray-900);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.submit-btn:hover:not(:disabled) {
    background: var(--black);
}

.submit-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.wallet-status {
    font-size: 0.8125rem;
    color: var(--gray-500);
    text-align: center;
    margin-top: 1rem;
}

.wallet-status.connected {
    color: var(--green-dark);
}

.wallet-status.error {
    color: #ef4444;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.modal-icon {
    margin-bottom: 1.5rem;
}

.modal-icon .status-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--gray-900);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.modal-icon.success .status-spinner {
    display: none;
}

.modal-icon.success::after {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    background: var(--green);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    background-size: 24px;
    background-position: center;
    background-repeat: no-repeat;
}

.modal-icon.error .status-spinner {
    display: none;
}

.modal-icon.error::after {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    background: #ef4444;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18L18 6M6 6l12 12'/%3E%3C/svg%3E");
    background-size: 20px;
    background-position: center;
    background-repeat: no-repeat;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--gray-500);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.tx-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.tx-link:hover {
    color: var(--gray-900);
}

.modal-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.modal-close-btn:hover {
    background: var(--gray-200);
}

/* Tweet Section */
.tweet-section {
    padding: 4rem 2rem 6rem;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--gray-100);
}

.tweet-embed blockquote {
    margin: 0 !important;
}

/* Footer */
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border-top: 1px solid var(--gray-100);
}

footer p {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--gray-400);
}

/* Code Blocks */
.code-block {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    background: var(--gray-900);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--gray-800);
    border-bottom: 1px solid var(--gray-700);
}

.code-filename {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.code-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-block pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--gray-300);
    white-space: pre;
}

/* Product Showcase */
.product-showcase {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.product-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    object-fit: contain;
}

.product-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    height: 300px;
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    color: var(--gray-500);
    font-size: 0.9375rem;
    gap: 0.5rem;
}

.placeholder-hint {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-family: 'JetBrains Mono', monospace;
}

/* Docs Page */
.docs-page {
    padding-top: 5rem;
}

.docs-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.docs-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.docs-intro {
    font-size: 1.125rem;
    color: var(--gray-500);
    margin-bottom: 4rem;
}

.docs-section {
    margin-bottom: 4rem;
}

.docs-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

.docs-section p {
    color: var(--gray-600);
    line-height: 1.7;
}

.docs-section a {
    color: var(--gray-900);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Flywheel */
.flywheel {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: 0.5rem;
    align-items: start;
}

.flywheel-step {
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-100);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--gray-900);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.flywheel-step h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.flywheel-step p {
    font-size: 0.8125rem;
    line-height: 1.5;
}

.flywheel-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding-top: 3rem;
    color: var(--gray-300);
}

.flywheel-arrow::after {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--gray-300);
    position: relative;
}

/* Steps List */
.steps-list {
    list-style: none;
    counter-reset: steps;
}

.steps-list li {
    counter-increment: steps;
    padding-left: 3rem;
    position: relative;
    margin-bottom: 1.5rem;
}

.steps-list li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps-list strong {
    display: block;
    margin-bottom: 0.25rem;
}

.steps-list p {
    font-size: 0.9375rem;
}

/* Breakdown */
.breakdown {
    margin-bottom: 1rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.breakdown-item.highlight {
    background: var(--gray-50);
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: 8px;
    border: none;
}

.breakdown-label {
    color: var(--gray-600);
}

.breakdown-value {
    font-weight: 500;
}

.breakdown-note {
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* FAQ */
.faq {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.faq-item p {
    font-size: 0.9375rem;
}

/* Docs CTA */
.docs-cta {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-100);
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 8rem 2rem 4rem;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-left {
        order: 1;
    }
    
    .hero-right {
        order: 2;
        align-items: center;
    }
    
    .thesis {
        text-align: center;
    }
    
    .price-row {
        justify-content: center;
    }
    
    .flywheel {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .flywheel-arrow {
        padding: 0;
        height: auto;
    }
    
    .flywheel-arrow::after {
        width: 2px;
        height: 24px;
    }
}

@media (max-width: 640px) {
    header {
        padding: 1rem 1.5rem;
    }
    
    .hero {
        padding: 7rem 1.5rem 3rem;
    }
    
    .hat-visual {
        max-width: 280px;
    }
    
    .order-section {
        padding: 4rem 1.5rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group.small {
        flex: 1;
    }
    
    .docs-container {
        padding: 3rem 1.5rem;
    }
    
    .docs-container h1 {
        font-size: 2rem;
    }
}
