:root {
    /* Brand palette (unchanged) */
    --sea: #6BAA9E;
    --pearl: #F8F8F4;
    --gold: #D8CBA8;
    --teal: #2F5E5A;
    --ink: #2b2b28;
    --muted: #5d6b67;

    /* Derived depth + glass tones */
    --deep: #1c3a37;
    --card: #FFFFFF;
    --gold-line: #C7B488;
    --sea-tint: rgba(107, 170, 158, .14);
    --teal-tint: rgba(47, 94, 90, .10);
    --teal-shadow: rgba(28, 58, 55, .16);

    --maxw: 1140px;
    --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--pearl);
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--teal);
    line-height: 1.1;
    font-weight: 560;
    letter-spacing: -.015em;
    font-optical-sizing: auto;
}

p { margin: 0 0 1rem; }
a { color: var(--teal); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--sea); }

:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 2px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* Eyebrow — prefixed by a short gold "lacing" rule (the recurring motif) */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--sea);
    font-weight: 700;
}
.eyebrow::before {
    content: "";
    width: 1.8rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-line));
}

.script { font-family: var(--font-display); font-style: italic; font-weight: 460; color: var(--sea); }

.section { padding: 5rem 0; }
.section--alt { background: linear-gradient(180deg, #FFFFFF, #FCFCF8); }

/* Gold lacing divider — the pour-cell hairline, reusable between sections */
.lacing {
    height: 1px;
    max-width: var(--maxw);
    margin: 0 auto;
    background: linear-gradient(90deg, transparent, var(--gold-line) 22%, var(--gold-line) 78%, transparent);
    opacity: .55;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: .8rem 1.7rem;
    border-radius: 10px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn + .btn { margin-left: .75rem; }
.btn-primary {
    background: linear-gradient(180deg, var(--sea), var(--teal));
    color: #fff;
    box-shadow: 0 6px 18px var(--teal-shadow);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px var(--teal-shadow); }
.btn-ghost { background: transparent; color: var(--teal); border-color: var(--gold-line); }
.btn-ghost:hover { background: var(--teal); color: #fff; border-color: var(--teal); transform: translateY(-2px); }

/* Header */
.site-header {
    background: rgba(248, 248, 244, .82);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--teal-tint);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: .85rem 0; }
.brand { display: flex; align-items: center; gap: .65rem; }
.brand img { height: 46px; width: auto; }
.brand__name { font-family: var(--font-display); font-weight: 560; font-size: 1.3rem; letter-spacing: -.01em; color: var(--teal); }
/* The nav is a popover so the mobile menu works without a circuit; on desktop the
   popover UA styles are neutralised and it is always shown. */
.nav, .nav[popover] {
    display: flex; gap: 1.6rem; align-items: center;
    position: static; inset: auto; margin: 0; padding: 0; border: 0;
    width: auto; height: auto; overflow: visible; background: none; color: inherit;
}
.nav a { font-weight: 600; font-size: .95rem; color: var(--ink); position: relative; }
.nav a:hover { color: var(--teal); }
.nav a.active { color: var(--teal); }
.nav a.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold-line);
}
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--teal); cursor: pointer; }

/* Footer */
.site-footer {
    background: var(--deep);
    color: var(--pearl);
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 2px solid var(--gold-line);
}
.site-footer a { color: var(--gold); }
.site-footer a:hover { color: #fff; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.site-footer .brand__name { color: var(--pearl); }

/* Hero — caustic-light wash + glass-framed mark */
.hero { position: relative; overflow: hidden; background: var(--pearl); }
.hero__wash {
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 140%;
    pointer-events: none;
    background:
        radial-gradient(38% 55% at 78% 30%, var(--sea-tint), transparent 70%),
        radial-gradient(45% 60% at 18% 70%, rgba(216, 203, 168, .18), transparent 70%),
        radial-gradient(40% 50% at 60% 90%, var(--teal-tint), transparent 72%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 3.5rem; align-items: center; padding: 5rem 0 5.5rem; }
.hero h1 { font-size: 3.35rem; margin: 1rem 0 1.1rem; font-weight: 580; }
.hero .lede { font-size: 1.18rem; color: var(--muted); margin-bottom: 1.8rem; max-width: 34ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0; }
.hero__art { position: relative; }
.hero__art::before {
    content: "";
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .9), var(--sea-tint) 55%, transparent 72%);
    filter: blur(6px);
}
.hero__art img {
    position: relative;
    width: 100%;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #FBFBF7);
    padding: .5rem;
    border: 1px solid rgba(199, 180, 136, .5);
    box-shadow: 0 22px 60px var(--teal-shadow), inset 0 1px 0 rgba(255, 255, 255, .8);
}

/* Float variant — mark sits directly in the caustic wash, no panel */
.hero__art--float::before {
    inset: -4%;
    background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, .85), var(--sea-tint) 48%, transparent 68%);
    filter: blur(10px);
}
.hero__art--float img {
    background: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 16px 34px var(--teal-shadow));
}

/* Category / feature cards — glass surfaces */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.feature-card {
    position: relative;
    background: linear-gradient(180deg, #FFFFFF, #FCFCF8);
    border: 1px solid var(--teal-tint);
    border-radius: 16px;
    padding: 1.75rem 1.6rem;
    box-shadow: 0 10px 30px var(--teal-tint), inset 0 1px 0 rgba(255, 255, 255, .7);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card::before {
    content: "";
    position: absolute;
    top: 0; left: 1.6rem; right: 1.6rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px var(--teal-shadow), inset 0 1px 0 rgba(255, 255, 255, .7); }
.feature-card h3 { margin-top: 0; margin-bottom: .5rem; font-size: 1.3rem; }
.feature-card p { color: var(--muted); }
.feature-card a { font-weight: 600; }

/* Portfolio */
.filter-tabs { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 2.5rem 0; }
.filter-tabs a {
    display: inline-block;
    border: 1px solid var(--gold-line);
    background: transparent;
    color: var(--teal);
    padding: .5rem 1.15rem;
    border-radius: 22px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .9rem;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.filter-tabs a:hover { border-color: var(--teal); }
.filter-tabs a.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.portfolio-tile {
    position: relative;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 0;
    padding: 0;
    background: var(--sea);
    box-shadow: 0 8px 24px var(--teal-tint);
    transition: transform .22s ease, box-shadow .22s ease;
}
.portfolio-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
    background: linear-gradient(135deg, rgba(255, 255, 255, .22), transparent 45%);
    opacity: 0;
    transition: opacity .22s ease;
}
.portfolio-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 34px var(--teal-shadow); }
.portfolio-tile:hover::after { opacity: 1; box-shadow: inset 0 0 0 1px rgba(199, 180, 136, .6); }
.portfolio-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Modal */
.modal { background: var(--pearl); border: 0; padding: 0; border-radius: 16px; width: min(540px, calc(100% - 3rem)); max-height: calc(100dvh - 3rem); overflow: auto; box-shadow: 0 30px 80px rgba(28, 58, 55, .4); }
.modal::backdrop { background: rgba(28, 58, 55, .55); backdrop-filter: blur(3px); }
.modal img { width: 100%; display: block; }
.modal__body { padding: 1.75rem; }
.modal__close { float: right; background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--teal); line-height: 1; }
.modal__body h3 { margin: .25rem 0 .3rem; font-size: 1.5rem; }

/* Form outcome + honeypot (kept off-screen rather than display:none, which some bots skip) */
.form-error { background: #fbeeea; border: 1px solid #e4b9ae; color: #7a3426; padding: 1rem 1.25rem; border-radius: 12px; margin-bottom: 1rem; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Forms */
.form { max-width: 480px; }
.form label { display: block; font-weight: 600; margin: 1.1rem 0 .35rem; color: var(--teal); }
.form input, .form textarea {
    width: 100%;
    padding: .8rem .9rem;
    border: 1px solid rgba(47, 94, 90, .3);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-tint); }
.form .validation-message { color: #c02b3c; font-size: .85rem; }
.form-success { background: var(--sea-tint); border: 1px solid var(--sea); padding: 1.1rem 1.25rem; border-radius: 12px; color: var(--teal); }

/* Pull quote */
.pullquote {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 420;
    font-size: 1.6rem;
    line-height: 1.4;
    color: var(--teal);
    border-left: 2px solid var(--gold-line);
    padding-left: 1.4rem;
    margin: 2.2rem 0;
}

/* Motion — hero load-in */
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.rise { opacity: 0; animation: rise .7s cubic-bezier(.2, .7, .2, 1) forwards; }
.rise-1 { animation-delay: .05s; }
.rise-2 { animation-delay: .18s; }
.rise-3 { animation-delay: .31s; }
.rise-4 { animation-delay: .44s; }

/* Responsive */
@media (max-width: 800px) {
    .nav:not(:popover-open) { display: none; }
    .nav:popover-open { flex-direction: column; align-items: flex-start; position: fixed; inset: 77px 0 auto 0; background: var(--pearl); padding: 1rem 1.5rem; border-bottom: 1px solid var(--teal-tint); gap: 1rem; }
    .nav a.active::after { display: none; }
    .nav-toggle { display: block; }
    .site-header__inner { position: relative; }
    .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 0; }
    .hero h1 { font-size: 2.5rem; }
    .hero__art { max-width: 380px; margin: 0 auto; }
    .card-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .section { padding: 3.5rem 0; }
}
@media (max-width: 480px) {
    .portfolio-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .rise { opacity: 1; }
}
