:root {
    color-scheme: light;
    --background: #f7f1e8;
    --surface: #fffaf3;
    --surface-raised: #fbe5d7;
    --text: #302329;
    --text-muted: #635159;
    --accent: #be3e30;
    --accent-bright: #872c24;
    --border: #ddccbe;
    --font-body: 'Manrope', sans-serif;
    --font-heading: 'Lora', Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}
body::before {
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    height: 720px;
    background: radial-gradient(ellipse at 80% 10%, #efa06940, transparent 65%);
    content: '';
    pointer-events: none;
}
::selection { background: var(--accent); color: var(--background); }
a {
    color: var(--accent);
    text-underline-offset: 4px;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
a:hover { color: var(--accent-bright); }
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent-bright);
    outline-offset: 5px;
    border-radius: 4px;
}
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
.skip-link {
    position: fixed;
    top: 12px;
    left: 16px;
    z-index: 2000;
    padding: 10px 18px;
    transform: translateY(-160%);
    background: var(--accent);
    color: var(--background);
    font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

/* The same navigation, with a smaller footprint on phones. */
header {
    color-scheme: dark;
    --background: #312126;
    --text: #fff6ec;
    --text-muted: #e1c9c5;
    --accent: #ff9b7d;
    --accent-bright: #ffb99c;
    --border: #644342;
    --surface: #3d292c;
    --surface-raised: #503335;
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 91px;
    border-bottom: 1px solid var(--border);
    background: #312126f5;
    backdrop-filter: blur(16px);
    transition: transform 220ms ease;
}
header.navbar-hidden { transform: translateY(-100%); }
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    max-width: 1240px;
    min-height: 90px;
    margin: 0 auto;
    padding: 12px 32px;
}
.logo {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 13px;
    color: var(--text);
    text-decoration: none;
}
.logo-mark {
    position: relative;
    display: block;
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 50%;
}
.logo-mark img {
    position: absolute;
    top: -5.7px;
    left: -19.6px;
    width: 93px;
    max-width: none;
    height: auto;
}
.logo-name { font-size: 0.875rem; font-weight: 500; line-height: 1.5; color: var(--text-muted); }
.logo-name strong { display: block; color: var(--text); font-size: 1.0625rem; font-weight: 600; }
.navbar { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.navbar > li { position: relative; }
.navbar a {
    display: block;
    padding: 12px 0;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
}
.navbar > li > a::after {
    position: absolute;
    right: 0;
    bottom: 5px;
    left: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
    content: '';
}
.navbar a:hover, .navbar a[aria-current] { color: var(--accent-bright); }
.navbar > li > a:hover::after, .navbar > li > a[aria-current]::after { transform: scaleX(1); }
.dropdown {
    position: absolute;
    top: 100%;
    left: -18px;
    display: none;
    width: 280px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 16px 40px #0003;
    list-style: none;
}
.dropdown a { padding: 12px; border-radius: 6px; line-height: 1.6; }
.dropdown a:hover { background: var(--surface-raised); }
.navbar li:hover > .dropdown, .navbar li:focus-within > .dropdown { display: block; }
.menu-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
}
.menu-toggle svg { width: 18px; height: 18px; }

/* Existing sections and content order are retained. */
main { max-width: 1180px; margin: 0 auto; padding: 64px 32px 24px; }
section { margin: 0 0 64px; padding: 0 0 64px; border-bottom: 1px solid var(--border); }
section:last-child { margin-bottom: 12px; border-bottom: 0; }
section h1, section h2, section h3 { font-family: var(--font-heading); font-weight: 400; text-wrap: balance; }
section h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    line-height: 1.3;
    text-align: left;
}
section h2 {
    margin: 0 0 40px;
    color: var(--accent);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    line-height: 1.35;
    letter-spacing: 0.035em;
    text-align: left;
}
section h2::after { display: block; width: 40px; height: 2px; margin: 20px 0 0; background: var(--accent); content: ''; }
section h3 { margin: 0 0 16px; color: var(--text); font-size: 1.42rem; line-height: 1.5; }
section h3 a { color: inherit; text-decoration: none; }
section h3 a:hover { color: var(--accent); }
section p { margin: 0 0 16px; color: var(--text-muted); font-size: 1.125rem; line-height: 1.95; text-align: left; }
section p:last-child { margin-bottom: 0; }
.about-content, .projects-content { display: flex; align-items: center; gap: 48px; }
.about-content > p, .projects-content > p { flex: 1; min-width: 0; margin: 0; }
.about-content img, .projects-content img {
    width: 28%;
    max-width: 310px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 40px #56362a14;
}
.news-content { display: flex; flex-direction: column; gap: 24px; }
.news-item {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 30px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}
.news-item > img { grid-column: 1; grid-row: 1 / 3; width: 100%; align-self: start; border-radius: 8px; }
.news-item-text { grid-column: 2; grid-row: 2; min-width: 0; }
.news-item p { font-size: 1.0625rem; line-height: 1.9; }
.news-item h5 {
    grid-column: 2;
    grid-row: 1;
    margin: 0 0 10px;
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    font-variant-numeric: tabular-nums;
}
.contact-icons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.contact-icons a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 152px;
    padding: 24px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    text-align: center;
    text-decoration: none;
}
.contact-icons a:hover { border-color: var(--accent); background: var(--surface-raised); }
.icon { color: var(--accent); font-size: 28px; }
.contact-tooltips { color: var(--text-muted); font-size: 0.78rem; font-weight: 500; line-height: 1.6; }
footer { --text-muted: #e1c9c5; padding: 28px 24px; border-top: 1px solid #644342; background: #312126; text-align: center; }
footer p { max-width: 740px; margin: 0 auto; color: var(--text-muted); font-size: 0.72rem; line-height: 1.8; }

/* Project page. */
.project-signup-content, .project-gifting-content, .project-about-content { display: flex; flex-direction: column; gap: 24px; }
.project-signup-content > a {
    align-self: center;
    padding: 14px 28px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent);
    color: var(--background);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    text-decoration: none;
}
.project-signup-content > a:hover { background: var(--accent-bright); }
.project-gifting-image { align-self: center; width: 50%; border-radius: 12px; }
.project-about-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.project-about-images-image { width: 100%; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border: 1px solid var(--border); text-align: center; }
th { background: var(--surface-raised); }

/* The same three-column photo gallery, with consistent spacing. */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.gallery-image { width: 100%; border: 1px solid var(--border); border-radius: 10px; }
.gallery-section { padding-bottom: 32px; }

@media (max-width: 1050px) {
    .nav-inner { gap: 20px; padding-right: 24px; padding-left: 24px; }
    .navbar { gap: 20px; }
    .logo-name { display: none; }
    .about-content, .projects-content { gap: 32px; }
}

@media (max-width: 700px) {
    html { scroll-padding-top: 94px; }
    header { min-height: 77px; }
    .nav-inner { flex-wrap: wrap; gap: 0; min-height: 76px; padding: 10px 20px; }
    .logo-name { display: block; font-size: 0.75rem; }
    .logo-name strong { font-size: 0.875rem; }
    .menu-toggle { display: inline-flex; }
    .navbar { display: none; flex-basis: 100%; align-items: stretch; gap: 0; padding: 16px 0 4px; }
    .navbar.is-open { display: flex; flex-direction: column; }
    .navbar a { padding: 12px 4px; font-size: 1rem; }
    .navbar > li > a::after { display: none; }
    .dropdown { position: static; display: block; width: auto; padding: 0 0 4px 16px; border: 0; background: transparent; box-shadow: none; }
    .dropdown a { color: var(--accent); font-size: 0.875rem; }
    main { padding: 40px 20px 16px; }
    section { margin-bottom: 40px; padding-bottom: 40px; }
    section h2 { margin-bottom: 28px; }
    section h2::after { margin-top: 16px; }
    section h3 { font-size: 1.25rem; }
    section p { font-size: 1.0625rem; line-height: 1.9; }
    .about-content, .projects-content { flex-direction: column; gap: 24px; }
    .about-content img, .projects-content img { width: 100%; max-width: 420px; }
    .news-item { display: flex; flex-direction: column; gap: 0; padding: 20px; }
    .news-item > img { order: 0; width: auto; max-width: 100%; max-height: 340px; margin: 0 auto 20px; object-fit: contain; }
    .news-item h5 { order: 1; margin-bottom: 10px; }
    .news-item-text { order: 2; }
    .contact-icons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .contact-icons a { min-height: 130px; padding: 20px 12px; }
    .contact-icons a:last-child { grid-column: 1 / -1; }
    .project-gifting-image { width: 100%; max-width: 480px; }
    .project-about-images { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

@media (max-width: 380px) {
    .logo-name { max-width: 140px; }
    .menu-toggle { gap: 6px; padding: 8px; }
    .gallery { grid-template-columns: 1fr; }
}

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