@font-face { font-family: gilroy-regular; src: url('../cp/fonts/gilroy-regular-webfont.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: gilroy-semibold; src: url('../cp/fonts/gilroy-semibold-webfont.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: gilroy-bold; src: url('../cp/fonts/gilroy-bold-webfont.woff2') format('woff2'); font-display: swap; }

:root {
    --wine: #8b001e;
    --wine-bright: #b9052b;
    --ink: #181316;
    --muted: #6b6266;
    --paper: #fbf8f5;
    --cream: #f2ebe6;
    --white: #fff;
    --line: rgba(55, 31, 40, 0.14);
    --shadow: 0 18px 54px rgba(55, 20, 32, 0.09);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: gilroy-regular, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #2d6cdf; outline-offset: 3px; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; color: #fff; background: var(--wine); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.discovery-header { border-bottom: 1px solid var(--line); background: rgba(251, 248, 245, .96); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; }
.brand img { display: block; height: auto; }
.desktop-nav { display: flex; gap: 24px; margin-left: auto; }
.desktop-nav a { text-decoration: none; font-size: .92rem; font-weight: 700; }
.desktop-nav a.is-active, .desktop-nav a:hover { color: var(--wine-bright); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.language-switch { padding: 7px 9px; color: var(--wine); border: 1px solid rgba(139, 0, 30, .22); border-radius: 999px; text-decoration: none; font-size: .78rem; font-weight: 780; }

.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0 21px; border: 1px solid transparent; border-radius: 999px; text-decoration: none; font: inherit; font-weight: 780; cursor: pointer; }
.button-primary { color: #fff; background: var(--wine-bright); box-shadow: 0 10px 25px rgba(185, 5, 43, .2); }
.button-primary:hover { background: var(--wine); }
.button-outline { color: var(--wine); border-color: rgba(139, 0, 30, .3); background: #fff; }
.button-quiet { min-height: 40px; padding-inline: 10px; }
.button-small { min-height: 40px; padding-inline: 17px; }
.button-block { width: 100%; margin-top: 10px; }

.discovery-hero { padding: 52px 0 0; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 80% 15%, rgba(185, 5, 43, .08), transparent 30%), var(--cream); }
.discovery-hero__heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; }
.discovery-hero__copy { min-width: 0; }
.eyebrow { margin: 0 0 12px; color: var(--wine-bright); font-size: .75rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: gilroy-semibold, Arial, sans-serif; font-weight: 400; letter-spacing: -.03em; line-height: 1.08; }
.discovery-hero h1 { max-width: 820px; margin-bottom: 14px; font-size: clamp(2.35rem, 3.8vw, 3.85rem); }
.discovery-hero__copy > p:not(.eyebrow) { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: 1.04rem; }
.discovery-create-action { flex: 0 0 auto; gap: 7px; margin-bottom: 4px; border-radius: 12px; }
.discovery-create-action span { font-size: 1.2rem; line-height: 1; }

.search-form { max-width: 850px; display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 26px 0 30px; padding: 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; box-shadow: var(--shadow); }
.search-form input { min-width: 0; padding: 0 18px; border: 0; outline: 0; background: transparent; font: inherit; }
.section-tabs { display: flex; gap: 6px; overflow-x: auto; }
.section-tabs a { flex: 0 0 auto; padding: 14px 18px; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font-size: .91rem; font-weight: 760; }
.section-tabs a.is-active { color: var(--wine); border-bottom-color: var(--wine-bright); }

.notice { margin-top: 28px; padding: 16px 20px; border: 1px solid #e7c66b; border-radius: 14px; background: #fff9df; }
.result-section { padding: 78px 0; }
.result-section-alt { background: #f3ede8; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-heading h2 { margin-bottom: 0; font-size: clamp(2rem, 3.5vw, 3.2rem); }
.section-heading > a, .text-link, .back-link { color: var(--wine); text-decoration: none; font-weight: 780; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.result-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 10px 34px rgba(55, 20, 32, .05); transition: transform 160ms ease, box-shadow 160ms ease; }
.result-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-link { position: absolute; z-index: 2; inset: 0; }
.card-type { display: inline-block; margin-bottom: 8px; color: var(--wine-bright); font-size: .71rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.result-card h3 { margin-bottom: 10px; font-size: 1.24rem; line-height: 1.3; }
.result-card p { color: var(--muted); }
.card-image { min-height: 190px; background: linear-gradient(145deg, #4c1726, #b9052b 62%, #e7b3bd); background-position: center; background-size: cover; }
.card-body { padding: 25px; }
.meta, .meta-row { color: var(--muted); font-size: .84rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 7px 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.profile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-card { min-height: 170px; display: grid; grid-template-columns: 92px 1fr; gap: 20px; align-items: center; padding: 26px; }
.avatar { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, var(--wine), #d74965); background-position: center; background-size: cover; font-family: gilroy-semibold, Arial, sans-serif; font-size: 2rem; }
.card-action { color: var(--wine); font-size: .86rem; font-weight: 780; }
.opportunity-card { min-height: 250px; padding: 28px; }
.empty-state { padding: 34px; border: 1px dashed rgba(139, 0, 30, .25); border-radius: 18px; color: var(--muted); background: rgba(255, 255, 255, .62); text-align: center; }

.join-strip { padding: 70px 0; color: #fff; background: #24181c; }
.join-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.join-inner h2 { max-width: 720px; margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.7rem); }
.join-inner .eyebrow { color: #efb7c3; }
.discovery-footer { padding: 28px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .88rem; }
.footer-inner > div, .legal-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }
.footer-inner a { color: var(--wine); font-weight: 800; text-decoration: none; }
.footer-brand img { display: block; width: 150px; height: auto; }

.detail-main { padding: 64px 0 90px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 55px; align-items: start; }
.detail-content h1 { max-width: 850px; margin: 18px 0 22px; font-size: clamp(2.7rem, 5vw, 5.1rem); }
.back-link { display: inline-block; margin-bottom: 44px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 30px; color: var(--muted); }
.detail-image { width: 100%; max-height: 560px; display: block; object-fit: cover; margin: 28px 0 44px; border-radius: 24px; }
.detail-copy { max-width: 790px; padding: 28px 0; border-top: 1px solid var(--line); }
.detail-copy h2 { margin-bottom: 15px; font-size: 1.8rem; }
.detail-copy p { color: #40373b; white-space: normal; }
.detail-aside { position: sticky; top: 24px; padding: 29px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.detail-aside h2 { font-size: 2rem; }
.detail-aside hr { margin: 26px 0; border: 0; border-top: 1px solid var(--line); }
.detail-aside p { color: var(--muted); }

.profile-main { padding: 60px 0 90px; }
.public-profile > .back-link { margin-bottom: 50px; }
.profile-hero { display: flex; align-items: center; gap: 34px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.profile-avatar-large { width: 150px; height: 150px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, var(--wine), #d74965); background-position: center; background-size: cover; font-family: gilroy-semibold, Arial, sans-serif; font-size: 4rem; }
.profile-hero h1 { margin: 8px 0 10px; font-size: clamp(2.8rem, 5vw, 5.2rem); }
.profile-location { margin: 0; color: var(--muted); }
.profile-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 55px; align-items: start; padding-top: 48px; }

.legal-main { padding: 70px 0 90px; }
.legal-layout { max-width: 940px; }
.legal-heading { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.legal-heading h1 { margin-bottom: 16px; font-size: clamp(2.8rem, 5vw, 5rem); }
.legal-heading > p:last-child { margin-bottom: 0; color: var(--muted); }
.legal-content { padding: 42px 0; color: #342b2f; }
.legal-content h2 { margin: 42px 0 16px; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.legal-content h3 { margin: 32px 0 12px; }
.legal-content p, .legal-content li { max-width: 78ch; }
.legal-content a { color: var(--wine); overflow-wrap: anywhere; }
.legal-content table { width: 100%; display: block; overflow-x: auto; border-collapse: collapse; }
.legal-content th, .legal-content td { padding: 10px; border: 1px solid var(--line); text-align: left; }
.legal-index { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 30px; border-top: 1px solid var(--line); }
.legal-index a { padding: 9px 13px; color: var(--wine); border: 1px solid rgba(139, 0, 30, .2); border-radius: 999px; text-decoration: none; font-weight: 740; }

@media (max-width: 900px) {
    .desktop-nav { display: none; }
    .header-actions { margin-left: auto; }
    .card-grid, .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-layout, .profile-body { grid-template-columns: 1fr; }
    .detail-aside { position: static; }
    .discovery-hero__heading { align-items: flex-start; flex-direction: column; gap: 20px; }
}

@media (max-width: 620px) {
    .shell { width: min(100% - 28px, 1160px); }
    .header-inner { min-height: 68px; }
    .brand img { width: 145px; }
    .button-quiet { display: none; }
    .discovery-hero { padding-top: 36px; }
    .discovery-hero h1 { font-size: clamp(2.15rem, 11vw, 3rem); }
    .discovery-create-action { width: 100%; }
    .search-form { grid-template-columns: 1fr; border-radius: 20px; }
    .search-form input { min-height: 48px; }
    .search-form .button { width: 100%; }
    .result-section { padding: 58px 0; }
    .section-heading { align-items: start; }
    .card-grid, .profile-grid { grid-template-columns: 1fr; }
    .join-inner, .footer-inner { align-items: start; flex-direction: column; }
    .join-inner .button { width: 100%; }
    .detail-main { padding-top: 38px; }
    .back-link { margin-bottom: 34px; }
    .profile-hero { align-items: flex-start; flex-direction: column; }
    .profile-avatar-large { width: 120px; height: 120px; font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
