:root {
    --ink: #2f251f;
    --muted: #746d68;
    --line: #e7e2de;
    --paper: #fbfaf8;
    --white: #ffffff;
    --clay: #4a3428;
    --moss: #344e41;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Plus Jakarta Sans", sans-serif; }
a { color: inherit; }

.public-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    width: 100%;
    height: 72px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(231, 226, 222, .9);
    background: rgba(255, 255, 255, .94);
    padding: 0 max(24px, calc((100% - 1360px) / 2));
    backdrop-filter: blur(14px);
}

.public-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.public-brand span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: var(--clay); color: #fff; font: 600 12px "JetBrains Mono", monospace; }
.public-brand strong { font-family: "Cormorant Garamond", serif; font-size: 22px; }
.public-header nav { display: flex; align-items: center; gap: 24px; font-size: 13px; font-weight: 600; }
.public-header nav a { text-decoration: none; }
.header-action { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; background: var(--clay); padding: 11px 16px; color: #fff; }
.header-action svg { width: 15px; height: 15px; }

.discovery-hero {
    position: relative;
    display: flex;
    min-height: min(720px, calc(100vh - 72px));
    align-items: flex-end;
    overflow: hidden;
    background-color: #41362f;
    background-image: var(--hero-image);
    background-position: center 28%;
    background-size: cover;
    color: #fff;
}
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 16, 13, .8) 0%, rgba(20, 16, 13, .4) 48%, rgba(20, 16, 13, .08) 76%), linear-gradient(0deg, rgba(20, 16, 13, .56) 0%, transparent 48%); }
.hero-content { position: relative; z-index: 1; width: min(1360px, calc(100% - 48px)); margin: 0 auto; padding: 76px 0 72px; animation: hero-reveal 700ms cubic-bezier(.2, .75, .25, 1) both; }
.eyebrow { margin: 0 0 8px; color: #8b817a; font: 500 10px "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
.discovery-hero .eyebrow { color: rgba(255, 255, 255, .72); }
h1, .feed-heading h2, .index-gate h2 { margin: 0; font-family: "Cormorant Garamond", serif; font-weight: 700; letter-spacing: 0; }
h1 { max-width: 700px; font-size: 72px; line-height: .94; }
.intro-copy { max-width: 560px; margin: 22px 0 0; color: rgba(255, 255, 255, .82); font-size: 15px; line-height: 1.7; }
.public-search { display: flex; width: min(620px, 100%); height: 58px; align-items: center; border: 1px solid rgba(255, 255, 255, .32); border-radius: 999px; background: rgba(255, 255, 255, .96); margin-top: 34px; padding: 7px; box-shadow: 0 18px 48px rgba(16, 12, 10, .22); }
.public-search > svg { width: 19px; margin-left: 12px; color: #9c948e; }
.public-search input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 0 12px; font: inherit; font-size: 13px; }
.public-search button { flex: none; border: 0; border-radius: 999px; background: var(--moss); padding: 12px 17px; color: #fff; font: inherit; font-size: 12px; font-weight: 700; }
.hero-caption { position: absolute; z-index: 1; right: max(24px, calc((100% - 1360px) / 2)); bottom: 38px; display: grid; min-width: 250px; border-top: 1px solid rgba(255, 255, 255, .38); padding-top: 12px; text-align: right; }
.hero-caption span, .hero-caption small { color: rgba(255, 255, 255, .66); font: 500 9px "JetBrains Mono", monospace; text-transform: uppercase; }
.hero-caption strong { margin: 4px 0; font: 700 18px "Cormorant Garamond", serif; }

.discovery-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--paper); padding: 0 max(20px, calc((100% - 1360px) / 2)); }
.discovery-paths a { position: relative; display: grid; min-height: 124px; align-content: center; border-right: 1px solid var(--line); padding: 22px 62px 22px 26px; text-decoration: none; transition: background 180ms ease; }
.discovery-paths a:first-child { border-left: 1px solid var(--line); }
.discovery-paths a:hover { background: #fff; }
.discovery-paths span { color: #918781; font: 500 9px "JetBrains Mono", monospace; text-transform: uppercase; }
.discovery-paths strong { margin-top: 8px; font: 700 25px "Cormorant Garamond", serif; }
.discovery-paths svg { position: absolute; top: 50%; right: 24px; width: 17px; transform: translateY(-50%); }

.discovery-feed { background: #fff; padding: 72px max(20px, calc((100% - 1360px) / 2)) 96px; }
.feed-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.feed-heading h2 { font-size: 40px; }
.feed-heading > p { max-width: 390px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: right; }
.masonry-feed { columns: 4 260px; column-gap: 18px; }
.discovery-card { display: inline-block; width: 100%; margin: 0 0 34px; break-inside: avoid; }
.discovery-card > a { display: block; text-decoration: none; }
.discovery-image { position: relative; overflow: hidden; border-radius: 6px; background: #e8e3df; }
.discovery-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.discovery-card:nth-child(4n + 1) .discovery-image { aspect-ratio: 4 / 5; }
.discovery-card:nth-child(4n + 2) .discovery-image { aspect-ratio: 3 / 4; }
.discovery-card:nth-child(4n + 3) .discovery-image { aspect-ratio: 1 / 1; }
.discovery-card:nth-child(4n) .discovery-image { aspect-ratio: 4 / 6; }
.discovery-image span { position: absolute; top: 12px; left: 12px; border-radius: 999px; background: rgba(255, 255, 255, .9); padding: 7px 10px; color: var(--clay); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.discovery-image > svg { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .92); padding: 9px; opacity: 0; transform: translateY(4px); transition: opacity 180ms ease, transform 180ms ease; }
.discovery-card:hover img { transform: scale(1.025); }
.discovery-card:hover .discovery-image > svg { opacity: 1; transform: translateY(0); }
.discovery-caption { padding: 10px 3px 0; }
.discovery-caption h3 { margin: 0; font: 700 19px/1.15 "Cormorant Garamond", serif; }
.discovery-caption p { margin: 4px 0 0; color: #8c847f; font-size: 10px; }

.craft-story { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); align-items: stretch; margin: 86px 0 0; background: #263b32; color: #fff; }
.craft-story-image { position: relative; min-height: 620px; overflow: hidden; }
.craft-story-image img { width: 100%; height: 100%; object-fit: cover; }
.craft-story-image span { position: absolute; left: 20px; bottom: 20px; background: rgba(255, 255, 255, .92); padding: 8px 11px; color: var(--clay); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.craft-story-copy { display: flex; flex-direction: column; justify-content: center; padding: 68px; }
.craft-story-copy .eyebrow { color: #adc5b8; }
.craft-story-copy h2 { max-width: 460px; margin: 0; font: 700 48px/.98 "Cormorant Garamond", serif; }
.craft-story-copy > p:not(.eyebrow) { max-width: 480px; margin: 24px 0 34px; color: rgba(255, 255, 255, .7); font-size: 13px; line-height: 1.75; }
.craft-story-copy dl { margin: 0 0 36px; border-top: 1px solid rgba(255, 255, 255, .18); }
.craft-story-copy dl div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; border-bottom: 1px solid rgba(255, 255, 255, .18); padding: 14px 0; font-size: 12px; }
.craft-story-copy dt { color: rgba(255, 255, 255, .5); }
.craft-story-copy dd { margin: 0; text-align: right; }
.craft-story-copy > a { display: inline-flex; width: max-content; align-items: center; gap: 9px; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.craft-story-copy > a svg { width: 16px; }

.index-gate { max-width: 680px; margin: 72px auto 0; text-align: center; }
.index-gate h2 { font-size: 42px; }
.index-gate > p:not(.eyebrow) { margin: 12px auto 22px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.index-gate a { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: var(--clay); padding: 13px 18px; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.index-gate a svg { width: 15px; }
.public-footer { display: grid; width: min(1360px, calc(100% - 40px)); min-height: 150px; grid-template-columns: 1fr 1.5fr 1fr; align-items: center; gap: 32px; margin: auto; color: #8b837d; font-size: 11px; }
.public-footer div { display: flex; align-items: center; gap: 10px; }
.public-footer strong { color: var(--ink); font: 700 19px "Cormorant Garamond", serif; }
.public-footer span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; font: 500 8px "JetBrains Mono", monospace; text-transform: uppercase; }
.public-footer p { margin: 0; }
.public-footer > p:last-child { text-align: right; }

@keyframes hero-reveal {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-shell { display: grid; width: min(1040px, calc(100% - 48px)); min-height: calc(100vh - 72px); grid-template-columns: .85fr 1.15fr; align-items: center; gap: 90px; margin: auto; padding: 60px 0; }
.login-panel { max-width: 390px; }
.login-panel h1 { font-size: 58px; }
.login-panel > p:not(.eyebrow) { margin: 16px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-panel form { display: grid; gap: 9px; }
.login-panel label { margin-top: 9px; color: #665e59; font-size: 11px; font-weight: 700; }
.login-panel input { width: 100%; height: 48px; border: 1px solid #dcd6d1; border-radius: 8px; background: #fff; padding: 0 13px; outline: 0; font: inherit; }
.login-panel input:focus { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(74, 52, 40, .08); }
.login-panel button { height: 48px; margin-top: 13px; border: 0; border-radius: 999px; background: var(--clay); color: #fff; font: inherit; font-size: 12px; font-weight: 700; }
.login-error { border-left: 3px solid #a44735; background: #f8ece8; padding: 11px 13px; color: #843928; font-size: 11px; }
.login-visual { height: min(680px, 76vh); overflow: hidden; border-radius: 18px; }
.login-visual img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 820px) {
    .public-header { height: 64px; padding-inline: 20px; }
    .public-header nav > a:not(.header-action) { display: none; }
    .public-header nav { gap: 10px; }
    .discovery-hero { min-height: 680px; background-position: 58% center; }
    .hero-shade { background: linear-gradient(0deg, rgba(20, 16, 13, .82) 0%, rgba(20, 16, 13, .32) 72%, rgba(20, 16, 13, .12)); }
    .hero-content { width: calc(100% - 40px); padding: 160px 0 42px; }
    h1 { font-size: 52px; }
    .intro-copy { font-size: 14px; }
    .hero-caption { display: none; }
    .discovery-paths { grid-template-columns: 1fr; padding-inline: 20px; }
    .discovery-paths a { min-height: 92px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
    .discovery-paths a:last-child { border-bottom: 0; }
    .feed-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .feed-heading > p { text-align: left; }
    .masonry-feed { columns: 2 140px; column-gap: 12px; }
    .discovery-card { margin-bottom: 20px; }
    .discovery-image { border-radius: 10px; }
    .discovery-caption h3 { font-size: 15px; }
    .craft-story { grid-template-columns: 1fr; margin-top: 58px; }
    .craft-story-image { min-height: 520px; }
    .craft-story-copy { padding: 46px 32px 52px; }
    .craft-story-copy h2 { font-size: 40px; }
    .index-gate { margin-top: 52px; }
    .index-gate h2 { font-size: 34px; }
    .public-footer { grid-template-columns: 1fr; gap: 14px; padding: 36px 0; }
    .public-footer > p:last-child { text-align: left; }
    .login-shell { min-height: calc(100vh - 64px); grid-template-columns: 1fr; padding: 48px 0; }
    .login-panel { width: 100%; max-width: 430px; margin: auto; }
    .login-visual { display: none; }
}

@media (max-width: 440px) {
    .public-brand strong { font-size: 20px; }
    .header-action { padding: 10px 13px; font-size: 11px; }
    h1 { font-size: 42px; }
    .discovery-hero { min-height: 620px; }
    .hero-content { padding-top: 130px; }
    .public-search { height: auto; min-height: 56px; }
    .public-search input { width: 100px; }
    .public-search button { min-height: 42px; }
    .public-search button { padding-inline: 13px; }
    .discovery-feed { padding-inline: 12px; }
    .feed-heading h2 { font-size: 34px; }
    .craft-story-image { min-height: 420px; }
    .craft-story-copy { padding: 38px 24px 44px; }
    .craft-story-copy h2 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-content { animation: none; }
    .discovery-card img { transition: none; }
}
