/* ======= Portfolio Cover Page ======= */
/* Loaded after style.css. Overrides the projects-list body defaults for the cover,
   inherits the footer treatment. */

body.cover-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Main ===== */
.cover {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 32px 24px;
}

/* Paper boat mark sits centered above the name — aspect ratio ~1.73:1 (wider than tall).
   Bumped from 52 → 88px so the three water strokes have room to read as intentional
   waves rather than sub-pixel noise. */
.cover-mark {
  color: var(--accent);
  width: 88px;
  margin: 0 auto 14px;
  display: block;
  line-height: 0;
}

.cover-mark svg {
  width: 100%;
  height: auto;
  display: block;
  transform-origin: 50% 70%;
}

.cover-mark:hover svg {
  animation: boat-sway-cover 2.4s ease-in-out infinite;
}

@keyframes boat-sway-cover {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

/* ===== Positioning statement ===== */
.cover-positioning {
  text-align: center;
}

.cover-name {
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 32px;
}

.cover-positioning p {
  font-family: 'Inter', sans-serif;
  font-size: clamp(15.5px, 1.25vw, 17.5px);
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 auto 20px;
  max-width: 640px;
  letter-spacing: -0.003em;
  font-weight: 400;
}

.cover-positioning p:last-child {
  margin-bottom: 0;
}

/* Threaded emphasis — accent color for the practice through-line words */
.cover-positioning .thread {
  color: var(--accent);
  font-weight: 500;
}

/* ===== CTA (positioned above the fold, right after positioning) ===== */
.cover-cta {
  text-align: center;
  margin: 36px 0 0;
}

.cover-cta-btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  padding: 12px 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.cover-cta-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 15, 16, 0.06);
}

.cover-cta-note {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--muted);
  margin: 16px auto 0;
  max-width: 460px;
  letter-spacing: -0.003em;
  line-height: 1.5;
}

.cover-cta-note a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(107, 107, 114, 0.45);
  text-underline-offset: 2px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.cover-cta-note a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ===== Ports of call ===== */
.cover-ports {
  margin: 32px auto 0;
  text-align: center;
  max-width: 900px;
  padding: 0 32px;
}

.cover-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 28px;
  position: relative;
  padding-bottom: 14px;
}

.cover-eyebrow::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

/* When positioned BELOW the fan, use flanking hairlines on both sides of the label
   (magazine section-title treatment: — PORTS OF CALL —). */
.cover-eyebrow--below {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
  position: static;
}

.cover-eyebrow--below::before,
.cover-eyebrow--below::after {
  content: "";
  position: static;
  width: 32px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
  transform: none;
  top: auto;
  bottom: auto;
  left: auto;
}

/* ===== Fan of cards (replaces grid) =====
   Cards read as a spread composition rather than 8 individual thumbnails.
   Each image is under a translucent haze so it registers as impression
   rather than image-to-be-scrutinized. */

.cover-fan {
  position: relative;
  height: 260px;
  margin: 0 auto;
  max-width: 100%;
}

.cover-fan-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 132px;
  height: 188px;
  margin-left: -66px;
  margin-top: -94px;
  background: #fff;
  border: 1px solid rgba(15, 15, 16, 0.06);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(15, 15, 16, 0.06), 0 1px 2px rgba(15, 15, 16, 0.05);
  padding: 12px 12px 14px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transform-origin: 50% 110%;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease, z-index 0s;
}

/* Fan positioning — 8 cards, progressive rotation and translate.
   Each card has its own rotation angle and horizontal offset. */
.cover-fan-card:nth-child(1) { transform: translate(-260px, 30px) rotate(-16deg); z-index: 1; }
.cover-fan-card:nth-child(2) { transform: translate(-190px, 14px) rotate(-11deg); z-index: 2; }
.cover-fan-card:nth-child(3) { transform: translate(-120px, 4px) rotate(-7deg); z-index: 3; }
.cover-fan-card:nth-child(4) { transform: translate(-50px, -2px) rotate(-3deg); z-index: 4; }
.cover-fan-card:nth-child(5) { transform: translate(50px, -2px) rotate(3deg); z-index: 5; }
.cover-fan-card:nth-child(6) { transform: translate(120px, 4px) rotate(7deg); z-index: 4; }
.cover-fan-card:nth-child(7) { transform: translate(190px, 14px) rotate(11deg); z-index: 3; }
.cover-fan-card:nth-child(8) { transform: translate(260px, 30px) rotate(16deg); z-index: 2; }

/* Hover: card straightens, lifts, brightens; comes to front. */
.cover-fan-card:hover {
  transform: translate(var(--hover-x, 0), -14px) rotate(0deg) scale(1.08);
  box-shadow: 0 14px 32px rgba(15, 15, 16, 0.14), 0 4px 10px rgba(15, 15, 16, 0.08);
  z-index: 20;
}

.cover-fan-card:nth-child(1):hover { --hover-x: -260px; }
.cover-fan-card:nth-child(2):hover { --hover-x: -190px; }
.cover-fan-card:nth-child(3):hover { --hover-x: -120px; }
.cover-fan-card:nth-child(4):hover { --hover-x: -50px; }
.cover-fan-card:nth-child(5):hover { --hover-x: 50px; }
.cover-fan-card:nth-child(6):hover { --hover-x: 120px; }
.cover-fan-card:nth-child(7):hover { --hover-x: 190px; }
.cover-fan-card:nth-child(8):hover { --hover-x: 260px; }

/* Card image area — small, at top, with translucent haze overlay */
.cover-fan-image {
  width: 100%;
  height: 108px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--line-soft);
  position: relative;
  flex-shrink: 0;
}

.cover-fan-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(0.85);
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.cover-fan-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(250, 250, 248, 0.35) 0%, rgba(250, 250, 248, 0.15) 100%);
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.cover-fan-card:hover .cover-fan-image img {
  opacity: 0.9;
  filter: saturate(1);
}

.cover-fan-card:hover .cover-fan-image::after {
  opacity: 0.4;
}

/* Card text — title + domain, left-aligned */
.cover-fan-text {
  padding-top: 10px;
  text-align: left;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.cover-fan-title {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cover-fan-domain {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* Nautical watermark — one small mark per card, bottom-left corner.
   Rotates with the card (physical intuition: mark is drawn on the paper). */
.cover-fan-mark {
  position: absolute;
  bottom: 9px;
  left: 9px;
  width: 16px;
  height: 16px;
  color: var(--accent);
  opacity: 0.32;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.cover-fan-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cover-fan-card:hover .cover-fan-mark {
  opacity: 0.55;
}

/* ===== Sea (wide, subtle, dots-separated) ===== */
.cover-sea-wrap {
  max-width: 1080px;
  margin: 44px auto 0;
  padding: 0 40px 60px;
}

.cover-sea {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  color: rgba(107, 107, 114, 0.62);
  text-align: center;
  letter-spacing: 0.015em;
  margin: 0;
  font-style: normal;
}

.cover-sea .salient {
  color: var(--accent);
  font-weight: 500;
}

/* ===== Thoughts on: Thinking with AI (standalone aside, between sea and footer) ===== */
.cover-thoughts {
  text-align: center;
  padding: 8px 40px 56px;
  max-width: 1080px;
  margin: 0 auto;
}

.cover-thoughts-link {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(14, 94, 111, 0.4);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
  letter-spacing: -0.003em;
}

.cover-thoughts-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== Slim footer override (just the copyright line, no Get in touch block) ===== */
.cover-footer-slim {
  padding-top: 32px;
  padding-bottom: 32px;
}

.cover-footer-slim .footer-bottom {
  border-top: none;
  padding-top: 0;
}

/* ===== Mobile ===== */
@media (max-width: 720px) {
  .cover {
    padding: 28px 20px 20px;
  }

  .cover-mark {
    width: 42px;
    margin-bottom: 10px;
  }

  .cover-name {
    margin-bottom: 24px;
  }

  .cover-positioning p {
    font-size: 15px;
    line-height: 1.55;
  }

  .cover-cta {
    margin-top: 28px;
  }

  .cover-cta-btn {
    font-size: 13px;
    padding: 11px 22px;
  }

  .cover-ports {
    margin: 48px 0 0;
  }

  .cover-ports {
    padding: 0 20px;
  }

  /* Mobile fallback: cards stack as a small 2-column grid, no rotation.
     Same card design, but positioned static. */
  .cover-fan {
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .cover-fan-card {
    position: static;
    transform: none !important;
    margin: 0;
    width: 100%;
    height: auto;
    z-index: auto !important;
  }

  .cover-fan-card:hover {
    transform: translateY(-3px) !important;
  }

  .cover-fan-image {
    height: 90px;
  }

  .cover-sea-wrap {
    padding: 0 20px 40px;
    margin-top: 32px;
  }

  .cover-sea {
    font-size: 11.5px;
    line-height: 1.9;
    text-align: left;
  }

  .cover-thoughts {
    padding: 4px 20px 40px;
  }

  .cover-thoughts-link {
    font-size: 12px;
  }
}
