/* CodePay Design System */
:root {
    --font-main: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    --bg-color: #FFFFFF;
    --bg-color-alt: #F5F5F7;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --accent-color: #0071E3;
    --accent-hover: #0077ED;
    --border-color: #D2D2D7;
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-blur: blur(20px);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* More subtle shadow */
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    /* For prominent elements */
    --transition-speed: 0.3s;
    --section-spacing: 120px;
    /* Reduced spacing */
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    letter-spacing: -0.02em;
    /* Tighter letter spacing */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    /* Pretendard Bold */
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 38px;
    /* 2/3 of 56px */
    /* Example hero size */
    line-height: 1.07143;
}

h2 {
    font-size: 25px;
    /* 2/3 of 48px */
    line-height: 1.08349;
}

h3 {
    font-size: 17px;
    /* 2/3 of 17px */
    /* Default body size */
    line-height: 1.47059;
    font-weight: 300;
    color: var(--text-secondary);
}

p {
    font-size: 11px;
    /* 2/3 of 17px */
    /* Default body size */
    line-height: 1.47059;
    font-weight: 400;
    color: var(--text-secondary);
}

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

.text-grad {
    background: linear-gradient(90deg, #1D1D1F 0%, #434344 100%);
    /* Subtle gradient for text */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* Layout Utilities */
.container {
    max-width: 980px;
    /* Apple's standard content width, sometimes 1024px */
    margin: 0 auto;
    padding: 0 20px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-4 {
    gap: 16px;
}

.gap-8 {
    gap: 32px;
}

/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 17px;
    font-weight: 600;
    /* Medium weight */
    border-radius: 980px;
    /* Pill shape */
    transition: all var(--transition-speed);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
    /* Subtle scale effect */
}

.btn-secondary {
    color: var(--accent-color);
    background-color: transparent;
}

.btn-secondary:hover {
    text-decoration: underline;
}

/* Header / Accessiblity */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    height: 44px;
    /* Default Apple nav height */
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    gap: 32px;
}

nav a {
    font-size: 12px;
    color: var(--text-primary);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

nav a:hover {
    opacity: 1;
}


/* Hero Section */
.hero {
    padding: 80px 0 30px;
    /* Reduced padding */
    text-align: center;
    overflow: hidden;
}

.hero h1 {
    max-width: 700px;
    margin: 0 auto 16px;
}

.hero p {
    max-width: 600px;
    margin: 0 auto 32px;
    font-size: 14px;
    /* 2/3 of 21px */
    /* Larger intro text */
    line-height: 1.4;
}

/* Features Grid */
.features {
    padding: var(--section-spacing) 0;
    background-color: var(--bg-color-alt);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.feature-card {
    background: #FFFFFF;
    border-radius: 18px;
    /* Smooth corners */
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
    color: var(--accent-color);
}

.feature-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1), transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1.05);
    /* Slight scale up as requested */
}

/* Feature Story Sections */
.story-section {
    min-height: 60vh;
    /* Reduced min-height */
    display: flex;
    align-items: center;
    padding: 60px 0;
    /* Reduced padding */
}

.story-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    max-width: 1200px;
    /* Wider container */
    margin: 0 auto;
    padding: 0 40px;
}

.story-text {
    flex: 1;
    max-width: 400px;
    /* Reduced from 480px */
}

.story-text h2 {
    font-size: 24px;
    /* 2/3 of 36px */
    /* Reduced to match smaller image */
}

.story-text p {
    font-size: 15px;
    /* Increased from 11px */
    /* Slightly reduced */
}

.story-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.story-image img {
    max-width: 192px;
    /* 2/3 of 288px */
    /* 80% of 360px */
    border-radius: 24px;
    /* Adjusted radius */
    box-shadow: var(--shadow-lg);
    border: 1px solid #E5E5EA;
    /* Thin light gray border */
}

/* Mobile Responsive */




/* Alternating Layout */
.story-section:nth-child(even) .story-container {
    flex-direction: row-reverse;
}

/* Partnership Section */
.partnership {
    padding: 70px 0 40px;
    /* Reduced from 160px */
    text-align: center;
    background-color: #FAFAFA;
}

/* Footer */
footer {
    padding: 20px 0;
    font-size: 7px;
    color: var(--text-secondary);
    background-color: var(--bg-color-alt);
    border-top: 1px solid var(--border-color);
}

/* Mobile Responsive - Moved to end for override */
@media (max-width: 768px) {
    .story-section {
        padding: 40px 0;
    }

    .story-container,
    .story-section:nth-child(even) .story-container {
        flex-direction: column-reverse;
        gap: 40px;
        text-align: center;
    }

    .story-image img {
        margin: 0 auto;
    }

    .story-text {
        max-width: 100%;
    }
}