/* =====================================================
   CURRUSCOS CLAN
   STYLE.CSS — Estética Apple (HIG)
===================================================== */

:root {
    --background: #f5f5f7;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #ffffff;
    --surface-soft: #f0f0f2;
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.12);
    --text: #1d1d1f;
    --muted: #86868b;
    --muted-light: #a1a1a6;
    --white: #ffffff;
    --accent: #0071e3;
    --accent-dark: #0077ed;
    --accent-soft: rgba(0, 113, 227, 0.08);
    --success: #34c759;
    --danger: #ff3b30;
    --max-width: 1200px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
}

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

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

body {
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.47059;
    letter-spacing: -0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
}

::selection {
    background: rgba(0, 113, 227, 0.2);
    color: var(--text);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 999px;
}

/* NAVBAR */
.navbar {
    height: 68px;
    width: 100%;
    padding: 0 max(20px, 4vw);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(245, 245, 247, 0.78);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}

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

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    position: relative;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 999px;
    transition: color 0.18s ease, background 0.18s ease;
}

nav a:hover {
    color: var(--text);
    background: rgba(120, 120, 128, 0.08);
}

nav a.active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 600;
}

.menu-button {
    display: none;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* HERO */
.hero {
    min-height: calc(100vh - 68px);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 5%;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 20px 0 24px;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
    font-weight: 700;
    color: var(--text);
}

.hero h1 span {
    color: var(--muted);
}

.hero p {
    max-width: 550px;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* BUTTONS */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: scale(0.97);
}

.button.primary {
    background: var(--text);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.button.primary:hover {
    background: #000000;
}

.button.secondary {
    border: 1px solid var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, 0.8);
}

.button.secondary:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.16);
}

/* STATS */
.stats-section {
    padding: 90px 5%;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.5);
}

.stats-grid {
    max-width: var(--max-width);
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat {
    padding: 24px 28px;
    border-left: 1px solid var(--border);
}

.stat:first-child {
    border-left: none;
}

.stat strong {
    display: block;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.stat span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

/* SECTIONS */
.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 100px 5%;
}

.section-heading {
    margin-bottom: 45px;
}

.section-heading > span {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.section-heading h2 {
    margin: 10px 0;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.section-heading p {
    max-width: 550px;
    color: var(--muted);
    font-size: 1rem;
}

/* CARDS */
.member-card,
.memory-card,
.dashboard-card,
.quick-card,
.event-card,
.expense-card,
.public-event-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.member-card:hover,
.memory-card:hover,
.quick-card:hover,
.event-card:hover,
.public-event-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: var(--shadow-md);
}

/* INPUTS & FORM CONTROLS */
input,
select,
textarea {
    border: 1px solid var(--border-strong) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--text) !important;
    padding: 0 14px !important;
    min-height: 44px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16) !important;
}

/* MEMBERS PREVIEW */
.members-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.member-image {
    aspect-ratio: 1 / 1;
    background: var(--surface-soft);
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.member-card:hover .member-image img {
    transform: scale(1.04);
}

.member-info {
    padding: 18px;
}

.member-info span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
}

.member-info h3 {
    margin-top: 4px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.member-info p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.82rem;
}

/* QUOTE */
.quote-section {
    padding: 120px 5%;
    text-align: center;
    background: #1d1d1f;
    color: #ffffff;
    border-top: none;
    border-bottom: none;
}

.quote-section > span {
    color: #8fc2ff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

blockquote {
    max-width: 900px;
    margin: 30px auto 20px;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.quote-section p {
    color: #a1a1a6;
    font-size: 0.9rem;
}

/* MEMORY GRID */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.memory-image {
    aspect-ratio: 16 / 10;
    background: var(--surface-soft);
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.memory-image img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.memory-card:hover .memory-image img {
    transform: scale(1.04);
}

.memory-content {
    padding: 20px;
}

.memory-content > span {
    color: var(--muted);
    font-size: 0.75rem;
}

.memory-content h3 {
    margin: 6px 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.memory-content p {
    color: var(--muted);
    font-size: 0.88rem;
}

/* CTA */
.cta {
    margin: 0 5% 80px;
    padding: 100px 30px;
    text-align: center;
    background: #1d1d1f;
    color: #ffffff;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.cta h2 {
    margin: 18px 0;
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.cta p {
    max-width: 500px;
    margin: 0 auto 30px;
    color: #a1a1a6;
    font-size: 1.05rem;
}

/* FOOTER */
footer {
    padding: 48px 5%;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    color: var(--muted);
    font-size: 0.8rem;
}

footer strong {
    color: var(--text);
    font-size: 0.95rem;
}

footer p {
    margin-top: 4px;
}

/* CURRUSCOS APP SHELL & MULTIGROUP CONTROLS */
.brand-group {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.current-group-button {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    border-radius: 9999px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: 230px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.current-group-button:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.16);
}

.group-menu,
.account-panel,
.notification-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.account-button {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: #1d1d1f;
    color: #ffffff;
    border-radius: 9999px;
    padding: 5px 11px 5px 6px;
    cursor: pointer;
}

.account-initial {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
}

.notification-button {
    position: relative;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    nav {
        gap: 16px;
    }
    .members-preview, .memory-grid, .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .navbar {
        height: 64px;
        padding: 0 16px;
    }
    nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        padding: 20px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        gap: 16px;
    }
    nav.mobile-open {
        display: flex;
    }
    .menu-button {
        display: block;
    }
    .hero {
        min-height: calc(100vh - 64px);
        padding: 60px 5%;
    }
    .hero h1 {
        font-size: 3.2rem;
    }
    .members-preview, .memory-grid {
        grid-template-columns: 1fr;
    }
    footer {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}
