/* Noctave website, home page v2 and « À propos » (session « page d'accueil v2 »): the first
   screen (promise, demo loop, call to action), the repertoire, the keyboards, the story.
   Loaded after styles.css and ecrin.css. No inline style: the CSP forbids it. */

/* ------------------------------------------------------------------ First screen */

.opening {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 48px var(--gutter) 72px;
}

.opening-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "demo"
    "act";
  gap: 28px;
  max-width: 1240px;
  margin: 0 auto;
}

.opening-head {
  grid-area: head;
  text-align: center;
}

.opening .eyebrow {
  margin-bottom: 18px;
}

.opening h1 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 300;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(10, 10, 18, 0.9);
  text-wrap: balance;
}

.opening h1 em,
.about-head h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #FFE2B0, var(--accent) 45%, #F3A955);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(255, 196, 107, 0.25));
}

.opening-lead {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.55;
  text-shadow: 0 1px 12px rgba(10, 10, 18, 0.9);
}

.opening-who {
  margin: 12px auto 0;
  color: var(--accent);
  font-size: 16px;
  font-weight: 500;
}

/* The demo loop, in a lacquer frame with a golden hairline. */
.demo {
  grid-area: demo;
  position: relative;
  margin: 0;
}

.demo-frame {
  position: relative;
  padding: 8px;
  border: 1px solid rgba(255, 196, 107, 0.35);
  border-radius: 18px;
  background: linear-gradient(to bottom, #221F34, #121120);
  box-shadow:
    0 0 60px rgba(92, 225, 255, 0.16),
    0 0 120px rgba(178, 141, 255, 0.10),
    0 24px 60px rgba(0, 0, 0, 0.55);
}

.demo-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 11px;
  background: #0A0A12;
}

.demo-toggle {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 196, 107, 0.45);
  border-radius: 50%;
  background: rgba(18, 17, 32, 0.82);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 160ms, background 160ms;
}

.demo-toggle:hover {
  border-color: var(--accent);
  background: rgba(34, 31, 52, 0.95);
}

.demo-toggle svg {
  width: 18px;
  height: 18px;
}

.demo-toggle .icon-play,
.demo-toggle[aria-pressed="true"] .icon-pause {
  display: none;
}

.demo-toggle[aria-pressed="true"] .icon-play {
  display: block;
}

.demo figcaption {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}

.opening-act {
  grid-area: act;
  display: grid;
  justify-items: center;
  gap: 24px;
}

.devices {
  display: grid;
  gap: 10px;
  max-width: 460px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.4;
}

.devices li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.devices svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--right-hand);
}

.devices li:nth-child(2) svg {
  color: var(--left-hand);
}

.devices li:nth-child(3) svg {
  color: var(--good);
}

/* ------------------------------------------------------------------ Repertoire */

.composer-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.composer-row a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  color: var(--text-primary);
  font-family: var(--font-title);
  font-weight: 300;
  font-size: 20px;
  text-decoration: none;
}

.moon-portrait {
  display: block;
  width: 100%;
  max-width: 140px;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1.5px solid rgba(255, 196, 107, 0.5);
  border-radius: 999px 999px 14px 14px;
  background: var(--bg-elevated);
  box-shadow: 0 0 36px rgba(92, 225, 255, 0.14), 0 14px 32px rgba(0, 0, 0, 0.45);
  transition: transform 200ms var(--ease), box-shadow 200ms;
}

.composer-row a:hover .moon-portrait {
  transform: translateY(-3px);
  box-shadow: 0 0 48px rgba(92, 225, 255, 0.3), 0 14px 32px rgba(0, 0, 0, 0.45);
}

.pieces-title {
  margin: 56px 0 18px;
  font-family: var(--font-title);
  font-weight: 300;
  font-size: 24px;
  text-align: center;
}

.pieces {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.pieces a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(255, 196, 107, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 120px),
    var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 160ms, transform 160ms var(--ease);
}

.pieces a:hover {
  border-color: rgba(255, 196, 107, 0.55);
  transform: translateY(-2px);
}

.piece-title {
  font-family: var(--font-title);
  font-weight: 300;
  font-size: 20px;
  line-height: 1.25;
}

.piece-meta {
  color: var(--text-secondary);
  font-size: 14px;
}

.section-more {
  margin: 32px 0 0;
  text-align: center;
}

/* ------------------------------------------------------------------ Keyboards */

.gear {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.gear .card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 18px;
  align-items: start;
}

.gear .medal {
  grid-row: span 2;
}

.gear h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 4px;
}

.gear h3 .pill {
  margin: 0;
  font-family: var(--font-ui);
}

/* ------------------------------------------------------------------ Plus, story, press */

.plus-price {
  font-size: 14px;
}

.story {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  grid-template-areas:
    "head quote"
    ". link";
  gap: 8px 48px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 44px 48px;
}

.story-head {
  grid-area: head;
}

.story .label,
.about-sign .label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story h2 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 42px);
  text-align: left;
}

.story-quote {
  grid-area: quote;
  margin: 0;
}

.story-quote blockquote {
  margin: 0;
  padding: 0 0 0 22px;
  border-left: 2px solid rgba(255, 196, 107, 0.45);
}

.story-quote blockquote p {
  margin: 0 0 14px;
  font-family: var(--font-title);
  font-weight: 300;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.5;
}

.story-quote figcaption {
  margin: 4px 0 0 22px;
  color: var(--text-secondary);
  font-size: 15px;
}

.story-link {
  grid-area: link;
  margin: 12px 0 0 22px;
  font-weight: 500;
}

.press-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 40px;
}

.press-strip h2 {
  margin: 0 0 6px;
  font-size: 30px;
  text-align: left;
}

.press-strip p {
  max-width: 620px;
  margin: 0;
  color: var(--text-secondary);
}

.closing-panel {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 40px 44px;
  text-align: center;
}

.closing-panel h2 {
  margin: 0 0 10px;
}

.closing-panel > p {
  max-width: 520px;
  margin: 0 auto 28px;
  color: var(--text-secondary);
}

/* ------------------------------------------------------------------ About page */

.about-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 56px var(--gutter) 40px;
  text-align: center;
}

.about-head h1 {
  max-width: 820px;
  margin: 0 auto;
  font-family: var(--font-title);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  text-wrap: balance;
}

.about-head .hands-line {
  margin: 22px auto 0;
}

.letter {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 52px 40px;
}

.letter p {
  margin: 0 0 22px;
  font-family: var(--font-title);
  font-weight: 300;
  font-size: clamp(19px, 2.1vw, 22px);
  line-height: 1.62;
}

.letter a {
  color: var(--right-hand-light);
}

.letter .signature {
  margin: 30px 0 0;
  font-family: var(--font-ui);
  font-size: 15px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 196, 107, 0.2);
  text-align: right;
}

.letter .signature .name {
  display: block;
  font-family: var(--font-title);
  font-size: 24px;
  line-height: 1.3;
  color: var(--text-primary);
}

.letter .signature .role {
  display: block;
  color: var(--text-secondary);
  font-size: 15px;
}

.about-sign {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 40px;
}

.about-sign h2 {
  margin: 0 0 12px;
  font-size: 28px;
  text-align: left;
}

.about-sign p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

.about-sign p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ Larger screens */

@media (min-width: 1000px) {
  .opening {
    padding-top: 72px;
    padding-bottom: 96px;
  }

  .opening-inner {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
    grid-template-areas:
      "head demo"
      "act demo";
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    row-gap: 32px;
    align-items: center;
  }

  .opening-head {
    align-self: end;
    text-align: left;
  }

  .opening-lead,
  .opening-who {
    margin-left: 0;
  }

  .opening-act {
    align-self: start;
    justify-items: start;
  }

  .opening-act .store-cta {
    justify-items: start;
    text-align: left;
  }
}

/* ------------------------------------------------------------------ Smaller screens */

/* One column: the moon keeps to the corner, off the headline. */
@media (max-width: 999px) {
  .opening .sky .moon {
    top: 14px;
    right: 14px;
    width: 44px;
  }
}

@media (max-width: 860px) {
  .composer-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 28px;
    max-width: 480px;
  }

  .pieces {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "quote"
      "link";
    gap: 20px;
    padding: 36px 28px;
  }
}

@media (max-width: 760px) {
  .gear {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .opening {
    padding-top: 28px;
    padding-bottom: 56px;
  }

  .opening-inner {
    gap: 24px;
  }

  .opening-lead {
    font-size: 17px;
  }

  .demo-frame {
    padding: 5px;
    border-radius: 14px;
  }

  .demo-video {
    border-radius: 9px;
  }

  .demo-toggle {
    right: 12px;
    bottom: 12px;
  }

  .pieces {
    grid-template-columns: minmax(0, 1fr);
  }

  .plus-teaser h2 {
    font-size: 28px;
  }

  .composer-row {
    gap: 16px;
  }

  .composer-row a {
    font-size: 17px;
  }

  .gear .card {
    grid-template-columns: minmax(0, 1fr);
  }

  .gear .medal {
    grid-row: auto;
    margin-bottom: 12px;
  }

  .press-strip,
  .about-sign {
    padding: 26px 22px;
  }

  .closing-panel {
    padding: 56px 22px 32px;
  }

  .letter {
    padding: 32px 22px 28px;
  }
}
