/* FoundationBookkeeping - Shared Styles */

/* Base Styles */
:root {
    --primary: #0f2a44;
    --secondary: #5c9b5a;
    --accent: #b45309;
    --ink: #0b1628;
    --sand: #f4f6f9;
}

body {
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at 18% 20%, rgba(92, 155, 90, 0.08), transparent 32%),
        radial-gradient(circle at 82% 0%, rgba(26, 54, 93, 0.08), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, #f5f7fb 40%, #f8fbff 100%);
    color: #0f172a;
}

.page-shell {
    min-height: 100vh;
    background: linear-gradient(180deg, rgba(26, 54, 93, 0.02) 0%, rgba(104, 160, 99, 0.02) 60%, rgba(180, 83, 9, 0.02) 100%);
}

/* Navigation */
.glass-nav {
    background: linear-gradient(90deg, rgba(15, 42, 68, 0.9) 0%, rgba(92, 155, 90, 0.88) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
    color: #eaf2fb;
}

.glass-nav a {
    color: rgba(234, 242, 251, 0.9);
}

.glass-nav a:hover {
    color: #ffffff;
}

.nav-inner {
    min-height: 4.75rem;
    padding: 0.75rem 0;
}

/* Buttons */
.btn-primary {
    background: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
    border-radius: 0.8rem;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28), 0 4px 10px rgba(15, 23, 42, 0.08);
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 18px 30px rgba(29, 78, 216, 0.32);
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid rgba(26, 54, 93, 0.16);
    transition: all 0.3s ease;
    border-radius: 0.8rem;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
    color: #0f2a44;
}

.btn-secondary:hover {
    border-color: rgba(26, 54, 93, 0.3);
    box-shadow: 0 14px 26px rgba(26, 54, 93, 0.14);
    transform: translateY(-1px);
}

/* Consistent section transitions */
section {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.section-contrast {
    background: linear-gradient(180deg, rgba(15, 42, 68, 0.96) 0%, rgba(15, 42, 68, 0.9) 100%);
    color: #e5edf6;
}

.section-contrast h2,
.section-contrast h3 {
    color: #f4f7fb;
}

.section-contrast p {
    color: #cfd9e7;
}

/* Ensure buttons in section-contrast have proper contrast */
.section-contrast .btn-primary {
    background: #3b82f6;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.25), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.section-contrast .btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.3), 0 6px 12px rgba(0, 0, 0, 0.22);
}

/* Card & surface styling */
.card-hover {
    transition: all 0.35s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.2);
}

.frost-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(26, 54, 93, 0.12);
    box-shadow: 0 22px 52px -20px rgba(15, 23, 42, 0.25);
}

.section-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 250, 252, 0.95) 100%);
    border: 1px solid rgba(26, 54, 93, 0.08);
    box-shadow: 0 20px 38px -18px rgba(15, 23, 42, 0.18);
}

.floating-badge {
    background: rgba(180, 83, 9, 0.08);
    color: #92400e;
    border: 1px solid rgba(180, 83, 9, 0.3);
    box-shadow: 0 12px 30px rgba(180, 83, 9, 0.18);
}

.eyebrow {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a365d;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    background: rgba(15, 42, 68, 0.07);
    border: 1px solid rgba(15, 42, 68, 0.12);
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.9rem;
    background: #ffffff;
    border: 1px solid rgba(15, 42, 68, 0.1);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.stat-chip strong {
    color: #1a365d;
}

.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(92, 155, 90, 0.2), rgba(15, 42, 68, 0.1));
    color: #1a365d;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

/* Icon System */
.icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    stroke-width: 2.1;
    fill: none;
    flex-shrink: 0;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-lg {
    width: 2rem;
    height: 2rem;
}

/* Media helpers */
.image-frame {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.04), rgba(104, 160, 99, 0.08));
    border: 1px solid rgba(26, 54, 93, 0.08);
}

.resource-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-placeholder {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(15, 42, 68, 0.04),
        rgba(15, 42, 68, 0.04) 12px,
        rgba(104, 160, 99, 0.06) 12px,
        rgba(104, 160, 99, 0.06) 24px
    );
    color: #1a365d;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 2px dashed rgba(26, 54, 93, 0.25);
    border-radius: inherit;
    text-align: center;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

/* Home Page Specific */
.hero-bg {
    background: radial-gradient(circle at 20% 20%, rgba(26, 54, 93, 0.08), transparent 35%),
                radial-gradient(circle at 80% 0%, rgba(92, 155, 90, 0.16), transparent 30%),
                linear-gradient(135deg, rgba(15, 42, 68, 0.06) 0%, rgba(104, 160, 99, 0.06) 100%);
    position: relative;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 10% auto auto 55%;
    width: 38%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(180, 83, 9, 0.15), transparent 55%);
    filter: blur(60px);
    pointer-events: none;
}

.hero-visual {
    background: linear-gradient(160deg, rgba(15, 42, 68, 0.96), rgba(92, 155, 90, 0.92));
    box-shadow: 0 30px 70px -30px rgba(15, 23, 42, 0.35);
    position: relative;
    overflow: hidden;
}

.hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 40%);
}

/* Services Page Specific */
.pricing-calculator {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.05) 0%, rgba(104, 160, 99, 0.05) 100%);
}

.feature-check {
    color: #68a063; /* secondary-sage */
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.feature-cross {
    color: #e5e7eb;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.add-on-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.add-on-title,
.add-on-caption,
.add-on-footer {
    text-align: center;
}

.add-on-footer {
    margin-top: auto;
}

.tier-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tier-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(26, 54, 93, 0.03) 100%);
    pointer-events: none;
}

.tier-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.tier-title {
    font-size: 1.75rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
    .tier-title {
        font-size: 2rem;
    }
}

.tier-subtitle {
    color: #4b5563;
}

.tier-features {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tier-cta {
    margin-top: auto;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.services-pricing {
    background: linear-gradient(180deg, rgba(239, 243, 249, 0.8) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.plan-card {
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    border: 1px solid rgba(15, 42, 68, 0.08);
    box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.25);
}

.featured-tier {
    background: linear-gradient(180deg, #ffffff 0%, rgba(241, 245, 249, 0.9) 100%);
    border: 1.5px solid rgba(37, 99, 235, 0.4);
    box-shadow: 0 40px 70px -28px rgba(37, 99, 235, 0.28);
}

.tier-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background: #0f2a44;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 18px 38px rgba(15, 42, 68, 0.28);
    margin: 0 auto;
}

.tier-icon-muted {
    background: rgba(37, 99, 235, 0.12);
    color: #0f2a44;
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.25);
}

/* About Page Specific */
.timeline-item {
    opacity: 0;
    transform: translateX(-20px);
}

.timeline-item.active {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.6s ease;
}

.expertise-card {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.05) 0%, rgba(104, 160, 99, 0.05) 100%);
}

/* Contact Page Specific */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

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

.calendar-day {
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background-color: #68a063; /* secondary */
    color: white;
}

.calendar-day.selected {
    background-color: #b45309; /* accent-copper */
    color: white;
}

.calendar-day.unavailable {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: transparent;
    color: #9ca3af;
}

.time-slot {
    transition: all 0.2s ease;
}

.time-slot:hover {
    background-color: #68a063;
    color: white;
}

.time-slot.selected {
    background-color: #b45309;
    color: white;
}

.form-input {
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.form-input:focus {
    border-color: #68a063;
    box-shadow: 0 0 0 3px rgba(104, 160, 99, 0.15);
}

/* Validation Feedback */
.form-input.border-red-500 {
    border-color: #ef4444 !important;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.success-animation {
    animation: successPulse 2s ease-in-out;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Form feedback */
.step-feedback {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #b91c1c;
    font-weight: 600;
}

.feedback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: #fee2e2;
    color: #dc2626;
    font-weight: 700;
}

.field-error-text {
    color: #b91c1c;
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

.input-error {
    background-color: #fff7f7;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18);
}

.group-error {
    border: 1px dashed #f87171;
    border-radius: 0.85rem;
    background: #fff7f7;
    padding: 0.5rem;
}

.step-indicator-error {
    background-color: #ef4444 !important;
    color: #fff !important;
}
