/* ============================================
   Shin Chin Shun MD — Medical Practice Website
   Plum + Amber | Clean Minimalist
   ============================================ */

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

:root {
    /* Plum palette */
    --plum-50:  #faf5f7;
    --plum-100: #f3e8ed;
    --plum-200: #e8d0db;
    --plum-300: #d4a8be;
    --plum-400: #c07fa1;
    --plum-500: #a85f82;
    --plum-600: #8e4b6a;
    --plum-700: #743d54;
    --plum-800: #5e3145;
    --plum-900: #4a2836;
    --plum-950: #2a1520;

    /* Amber palette */
    --amber-50:  #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;

    /* Neutrals */
    --white:    #ffffff;
    --gray-50:  #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Font families */
    --font-sans:  'Instrument Sans', system-ui, -apple-system, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;

    /* Spacing scale */
    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border radius */
    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(74, 40, 54, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(74, 40, 54, 0.08), 0 2px 4px -2px rgba(74, 40, 54, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(74, 40, 54, 0.1), 0 4px 6px -4px rgba(74, 40, 54, 0.06);
    --shadow-xl: 0 20px 25px -5px rgba(74, 40, 54, 0.12), 0 8px 10px -6px rgba(74, 40, 54, 0.08);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.7;
    color: var(--gray-800);
    background-color: var(--white);
    overflow-x: hidden;
}

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

a {
    color: var(--plum-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--plum-700);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ---------- Skip Link ---------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    background: var(--plum-800);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    z-index: 1000;
    font-size: 0.875rem;
}

.skip-link:focus {
    top: var(--space-md);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    border-radius: var(--radius-full);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--plum-700);
    color: var(--white);
    border-color: var(--plum-700);
}

.btn-primary:hover {
    background: var(--plum-800);
    border-color: var(--plum-800);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--plum-700);
    border-color: var(--plum-300);
}

.btn-outline:hover {
    background: var(--plum-50);
    border-color: var(--plum-500);
    color: var(--plum-800);
}

.btn-full {
    width: 100%;
}

/* ---------- Typography ---------- */
.section-eyebrow {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--plum-500);
    margin-bottom: var(--space-md);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: var(--space-lg);
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--gray-600);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

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

/* ---------- Header ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-100);
    transition: box-shadow var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--gray-900);
}

.logo-mark {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--plum-500), var(--plum-700));
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.logo-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border: 2px solid var(--white);
    border-radius: 50%;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav a {
    font-size: 0.9375rem;
    color: var(--gray-600);
    text-decoration: none;
    transition: color var(--transition-fast);
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--plum-500);
    transition: width var(--transition-base);
}

.nav a:hover {
    color: var(--plum-700);
}

.nav a:hover::after {
    width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 101;
}

.hamburger {
    display: block;
    width: 22px;
    height: 14px;
    position: relative;
}

.hamburger::before,
.hamburger::after,
.hamburger span {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--gray-700);
    transition: all var(--transition-base);
}

.hamburger::before { top: 0; }
.hamburger span { top: 50%; transform: translateY(-50%); }
.hamburger::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger span {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--plum-950);
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(168, 95, 130, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(245, 158, 11, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(142, 75, 106, 0.3) 0%, transparent 60%),
        linear-gradient(160deg, var(--plum-950) 0%, var(--plum-900) 40%, #3d1f30 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: 
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 780px;
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--amber-300);
    margin-bottom: var(--space-xl);
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid rgba(253, 211, 77, 0.3);
    border-radius: var(--radius-full);
    background: rgba(253, 211, 77, 0.06);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5.5vw, 3.75rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: var(--space-xl);
    letter-spacing: -0.02em;
}

.hero-title em {
    font-style: italic;
    color: var(--amber-300);
}

.hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.1875rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
}

.hero-scroll-indicator span {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.5);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: translateX(-50%) translateY(0); opacity: 0; }
    30% { opacity: 1; }
    70% { opacity: 1; }
    100% { transform: translateX(-50%) translateY(20px); opacity: 0; }
}

/* ---------- About ---------- */
.about {
    padding: var(--space-4xl) 0;
    background: var(--white);
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/5;
}

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

.about-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(168, 95, 130, 0.15);
    pointer-events: none;
}

.about-content {
    padding: var(--space-xl) 0;
}

.about-content p {
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
    font-size: 1.0625rem;
    line-height: 1.8;
}

.about-features {
    list-style: none;
    margin-top: var(--space-xl);
    display: grid;
    gap: var(--space-md);
}

.about-features li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    font-size: 1rem;
    color: var(--gray-700);
}

.feature-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--plum-500);
    margin-top: 3px;
}

/* ---------- Services ---------- */
.services {
    padding: var(--space-4xl) 0;
    background: var(--plum-50);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-3xl);
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--plum-400), var(--amber-400));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--plum-200);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--plum-50);
    color: var(--plum-600);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--plum-100);
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ---------- Approach ---------- */
.approach {
    padding: var(--space-4xl) 0;
    background: var(--white);
}

.approach-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.approach-content {
    order: 1;
}

.approach-content p {
    color: var(--gray-600);
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.approach-image {
    order: 2;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 7/5;
}

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

.approach-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(168, 95, 130, 0.15);
    pointer-events: none;
}

/* ---------- Testimonial ---------- */
.testimonial {
    padding: var(--space-4xl) 0;
    background: linear-gradient(135deg, var(--plum-900) 0%, var(--plum-950) 100%);
    position: relative;
    overflow: hidden;
}

.testimonial::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 50% 80% at 80% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 10% 80%, rgba(168, 95, 130, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

.testimonial-inner {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-quote {
    color: var(--plum-300);
    margin-bottom: var(--space-xl);
    opacity: 0.5;
}

.testimonial blockquote {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.6;
    color: var(--white);
    margin-bottom: var(--space-xl);
}

.testimonial-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.testimonial-author {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--amber-300);
    font-weight: 400;
}

/* ---------- Contact ---------- */
.contact {
    padding: var(--space-4xl) 0;
    background: var(--gray-50);
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.contact-intro {
    font-size: 1.0625rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
}

.contact-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--plum-500);
}

.contact-item dd a,
.contact-item dd {
    font-size: 1.0625rem;
    color: var(--gray-700);
    line-height: 1.7;
}

.contact-item dd a:hover {
    color: var(--plum-600);
}

/* Form */
.contact-form-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
}

.form-title {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--gray-900);
    margin-bottom: var(--space-xl);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--gray-800);
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--plum-400);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(168, 95, 130, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    text-align: center;
    padding: var(--space-2xl);
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    color: var(--plum-500);
}

.form-success h4 {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.form-success p {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--plum-950);
    color: rgba(255, 255, 255, 0.6);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 1.1875rem;
    color: var(--white);
}

.footer-tagline {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links nav ul {
    list-style: none;
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--amber-300);
}

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    font-size: 0.8125rem;
}

.footer-disclaimer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ---------- Scroll Reveal (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --space-4xl: 4rem;
        --space-3xl: 3rem;
    }

    .nav-toggle {
        display: block;
    }

    .nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--gray-100);
        padding: var(--space-lg) var(--space-xl);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav ul {
        flex-direction: column;
        gap: var(--space-md);
    }

    .nav a {
        font-size: 1.0625rem;
    }

    .about-inner,
    .approach-inner,
    .contact-inner {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .about-image {
        aspect-ratio: 16/9;
    }

    .approach-content {
        order: 2;
    }

    .approach-image {
        order: 1;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-inner {
        gap: var(--space-xl);
    }

    .footer-links nav ul {
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero-content {
        padding-top: var(--space-3xl);
    }

    .service-card {
        padding: var(--space-xl);
    }

    .contact-form-wrapper {
        padding: var(--space-xl);
    }
}
