.project-cabinet { min-height: calc(100svh - 175px); display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.project-tabs { align-self: start; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.project-tab { padding: 16px 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.project-tab small { display: block; margin-bottom: 4px; color: rgba(8,47,102,.58); }
.project-tab strong { font-size: 1rem; }
.project-tab.active { padding-left: 18px; background: var(--mist); border-radius: 6px; transform: rotate(-.5deg); }
.project-display { position: relative; min-height: 560px; }
.project-panel { display: none; grid-template-columns: 1.1fr .9fr; gap: 38px; align-items: center; }
.project-panel.active { display: grid; animation: settle .35s ease-out; }
.project-visual { position: relative; min-height: 500px; display: grid; place-items: center; overflow: hidden; background: var(--mist); border-radius: var(--soft-corner); }
.project-visual img { width: 100%; height: 100%; object-fit: cover; }
.project-visual.phone-spread { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 34px; background: var(--ink); }
.project-visual.phone-spread img { height: auto; border-radius: 12px; }
.project-visual.phone-spread img:nth-child(2) { transform: translateY(-20px); }
.project-copy .script-subtitle { margin: 0 0 14px; color: var(--ocean); font-size: clamp(2.5rem, 5vw, 4.7rem); line-height: 1.15; }
.project-meta { margin: 18px 0; padding: 13px 0; border-block: 1px solid var(--line); font-size: .83rem; }

.life-page { background: linear-gradient(180deg, var(--pale), rgba(255,250,241,.78)); }
.life-controls { position: sticky; top: 72px; z-index: 20; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; padding: 12px 0; background: rgba(234,248,251,.9); backdrop-filter: blur(10px); }
.filter-button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(251,244,229,.82); font-size: .78rem; cursor: pointer; }
.filter-button.active { background: var(--ink); color: var(--white); }
.shuffle-button { margin-left: auto; color: var(--coral); }
.gallery-container { columns: 3 260px; column-gap: 16px; }
.gallery-item { position: relative; break-inside: avoid; margin: 0 0 16px; overflow: hidden; background: var(--paper); border-radius: var(--soft-corner); transition: transform .25s ease, opacity .25s ease; }
.gallery-item.hidden { display: none; }
.gallery-item.featured { transform: rotate(-2deg) scale(.98); box-shadow: 0 12px 30px rgba(8,47,102,.16); }
.gallery-item img { width: 100%; cursor: zoom-in; transition: transform .45s ease; }
.gallery-item:hover img { transform: scale(1.025); }
.item-description { position: absolute; inset: auto 0 0; padding: 34px 14px 12px; background: linear-gradient(transparent, rgba(2,28,62,.78)); color: var(--white); opacity: 0; transition: opacity .2s ease; }
.gallery-item:hover .item-description, .gallery-item:focus-within .item-description { opacity: 1; }
.item-description p { margin: 0; font-size: .8rem; line-height: 1.45; }
.modal { display: none; position: fixed; inset: 0; z-index: 100; place-items: center; padding: 30px; background: rgba(2,28,62,.92); }
.modal.open { display: grid; }
.modal-content { max-height: 86vh; max-width: 90vw; object-fit: contain; }
.close-btn { position: fixed; right: 22px; top: 18px; border: 0; background: transparent; color: var(--white); font-size: 2rem; cursor: pointer; }
#back-to-top-btn { position: fixed; right: 18px; bottom: 18px; display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); cursor: pointer; }
#back-to-top-btn.visible { display: block; }

.contact-form .form-group { margin-bottom: 15px; }
.contact-form label { display: block; margin-bottom: 4px; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.contact-form input, .contact-form textarea { width: 100%; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); }
.contact-form input:focus, .contact-form textarea:focus { outline: 0; border-color: var(--ocean); box-shadow: 0 1px 0 var(--ocean); }
.form-status { min-height: 1.4em; margin: 10px 0 0; font-size: .8rem; }
.form-status.error { color: #a31d2b; }

.case-page { height: 100svh; overflow: hidden; background: #052b5c; color: var(--white); }
.case-deck { position: relative; height: 100svh; padding-top: 72px; overflow: hidden; background: radial-gradient(circle at 70% 45%, rgba(72,202,228,.18), transparent 32%), linear-gradient(160deg,#052b5c,#0a4778); }
.case-slide { position: absolute; inset: 72px 0 88px; display: none; align-items: center; overflow-y: auto; }
.case-slide.active { display: flex; animation: settle .4s ease-out; }
.slide-inner { width: var(--page); margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 55px; align-items: center; padding-block: 35px; }
.slide-copy { min-width: 0; }
.slide-copy .script-title { max-width: 10ch; color: var(--paper); font-size: clamp(3.2rem, 5.6vw, 5.35rem); line-height: 1.12; text-wrap: balance; }
.slide-copy .script-title + p { margin-top: clamp(32px, 4vw, 52px); }
.slide-copy p { color: rgba(255,250,241,.84); }
.slide-visual { display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 440px; }
.slide-visual img { max-height: 520px; width: auto; border-radius: 20px; box-shadow: 0 24px 60px rgba(0,15,45,.4); }
.slide-visual img:nth-child(2) { transform: translateY(-24px) rotate(2deg); }
.process-list { margin: 22px 0; padding: 0; list-style: none; }
.process-list li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.case-nav { position: fixed; z-index: 15; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; }
.case-nav button { color: var(--paper); cursor: pointer; }
.case-prev, .case-next { width: 38px; height: 38px; padding: 0; border: 1px solid rgba(255,250,241,.42); border-radius: 50%; background: rgba(255,250,241,.06); font-size: 1.5rem; line-height: 1; }
.case-prev:hover, .case-next:hover { background: rgba(255,250,241,.14); }
.case-prev:disabled, .case-next:disabled { opacity: .32; cursor: default; }
.case-nav button:focus-visible { outline: 1px solid rgba(255,250,241,.78); outline-offset: 3px; }
.case-page .button { letter-spacing: .035em; }
.case-voyage { --boat-left: 4%; position: relative; width: min(330px, 52vw); padding-top: 7px; }
.voyage-track { position: relative; display: flex; align-items: flex-end; justify-content: space-between; height: 38px; }
.voyage-track::before { content: ''; position: absolute; left: 4px; right: 4px; bottom: 8px; height: 7px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='7' viewBox='0 0 80 7'%3E%3Cpath d='M0 4c8-4 16 4 24 0s16 4 24 0 16 4 24 0 8 0 8 0' fill='none' stroke='%23fffaf1' stroke-opacity='.34'/%3E%3C/svg%3E") repeat-x left center / 80px 7px; }
.case-dot { position: relative; z-index: 2; width: 9px; height: 9px; padding: 0; border: 1px solid rgba(255,250,241,.55); border-radius: 50%; background: #0a4778; }
.case-dot.active { background: var(--paper); box-shadow: 0 0 0 3px rgba(255,250,241,.13); }
.voyage-boat { position: absolute; z-index: 3; left: var(--boat-left); bottom: 12px; width: 42px; color: var(--paper); transform: translateX(-50%); transition: left .68s cubic-bezier(.22,1,.36,1); filter: drop-shadow(0 4px 5px rgba(0,15,45,.28)); pointer-events: none; }
.voyage-boat svg { display: block; width: 100%; overflow: visible; }
.boat-mast { fill: none; stroke: currentColor; stroke-width: 1.5; }
.boat-sail { fill: rgba(255,250,241,.94); stroke: rgba(255,250,241,.55); stroke-width: .7; }
.boat-sail-back { fill: rgba(202,240,248,.88); }
.boat-hull { fill: #f6a49d; stroke: rgba(255,250,241,.7); stroke-width: .7; }
.voyage-boat.sailing { animation: boat-sail .68s cubic-bezier(.22,1,.36,1); }
.voyage-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes boat-sail { 0%, 100% { transform: translateX(-50%) rotate(0); } 45% { transform: translateX(-50%) translateY(-4px) rotate(-3deg); } 72% { transform: translateX(-50%) translateY(-1px) rotate(2deg); } }

@media (max-width: 800px) {
  .project-cabinet { grid-template-columns: 1fr; gap: 22px; }
  .project-tabs { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .project-tab { min-width: 145px; }
  .project-panel.active { grid-template-columns: 1fr; }
  .project-visual { min-height: 330px; }
  .project-visual.phone-spread { padding: 22px 12px; }
  .life-controls { top: 62px; }
  .gallery-container { columns: 2 145px; column-gap: 10px; }
  .gallery-item { margin-bottom: 10px; }
  .item-description { position: static; padding: 9px 10px; background: var(--paper); color: var(--ink); opacity: 1; }
  .case-slide { top: 62px; bottom: 88px; }
  .slide-inner { grid-template-columns: 1fr; gap: 22px; padding-block: 22px; }
  .slide-copy .script-title { max-width: 11ch; font-size: 3.1rem; }
  .slide-copy .script-title + p { margin-top: 30px; }
  .slide-visual { min-height: 260px; }
  .slide-visual img { max-height: 330px; border-radius: 10px; }
  .case-voyage { width: min(230px, 55vw); }
  .case-prev, .case-next { width: 34px; height: 34px; }
}
