/* Pianostemmer'n — sidelayout. Paletten ligger i brand.css. */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ebony);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

a { color: var(--felt); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--felt-bright);
  outline-offset: 2px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--felt);
  margin: 0 0 0.75rem;
}

/* Mørk scene: header + hero deler bakgrunnsfoto */
.hero-stage {
  position: relative;
  overflow: hidden;
  background-color: var(--ebony);
  background-image:
    linear-gradient(180deg, rgba(27, 22, 19, 0.72) 0%, rgba(27, 22, 19, 0.35) 45%, rgba(27, 22, 19, 0.82) 100%),
    url('hero-piano.jpg');
  background-size: cover;
  background-position: calc(50% + var(--mx, 0) * 14px) calc(38% + var(--my, 0) * 10px);
  background-attachment: fixed;
  color: var(--ivory);
}
.hero { transform: translate(calc(var(--mx, 0) * -7px), calc(var(--my, 0) * -5px)); }

/* Pustende scenelys — to varme lyskjegler i rust og messing */
.hero-stage::before {
  content: '';
  position: absolute;
  inset: -22%;
  pointer-events: none;
  background:
    radial-gradient(36% 44% at 68% 28%, rgba(217, 140, 74, 0.30), transparent 70%),
    radial-gradient(30% 42% at 24% 66%, rgba(166, 61, 42, 0.22), transparent 70%);
  animation: scenelys 24s ease-in-out infinite alternate;
}
@keyframes scenelys {
  0% { transform: translate3d(-2.5%, -2%, 0) scale(1); opacity: 0.7; }
  100% { transform: translate3d(2.5%, 2%, 0) scale(1.08); opacity: 1; }
}

/* Støv i lysstrålen */
.stov {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.site-header, .hero { position: relative; z-index: 1; }

/* Header */
.site-header {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.logo { height: 52px; width: auto; }
.site-header nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.site-header nav a {
  color: var(--ivory);
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.85;
}
.site-header nav a:hover { opacity: 1; color: var(--felt-bright); }
.site-header .nav-cta {
  color: var(--ivory);
  opacity: 1;
  font-weight: 600;
  border: 1.5px solid var(--felt-bright);
  border-radius: 6px;
  padding: 0.35rem 0.9rem;
}
.site-header .nav-cta:hover { background: var(--felt); border-color: var(--felt); color: var(--ivory); }

/* Hero */
.hero {
  max-width: 46rem;
  margin: 0 auto;
  min-height: 78vh;
  padding: 9vh 1.5rem 10vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero .eyebrow { color: var(--felt-bright); }
.hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.25rem);
  margin-bottom: 0.35em;
  /* Varmt lysstreif av messing/rust i kanten av bokstavene */
  color: var(--ivory);
  background: linear-gradient(105deg, var(--ivory) 52%, #dfa86a 82%, #b06a33 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead {
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  max-width: 58ch;
  color: var(--ivory);
  opacity: 0.92;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
  margin-top: 0;
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.9rem;
}
.scroll-cue {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ivory);
  opacity: 0.65;
  font-size: 1.4rem;
  text-decoration: none;
  animation: cue-bob 2.4s ease-in-out infinite;
}
.scroll-cue:hover { opacity: 1; }
@keyframes cue-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

.btn {
  display: inline-block;
  background: var(--felt);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--felt);
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
}
.btn:hover { background: var(--felt-dark); border-color: var(--felt-dark); }
.btn-ghost {
  background: rgba(27, 22, 19, 0.25);
  color: var(--ivory);
  border-color: var(--ivory);
}
.btn-ghost:hover { background: rgba(27, 22, 19, 0.45); color: var(--ivory); border-color: var(--ivory); }

.btn-outline {
  background: transparent;
  color: var(--ebony);
  border-color: var(--ebony);
}
.btn-outline:hover { background: transparent; color: var(--felt); border-color: var(--felt); }
.btn.is-playing { animation: spiller 2.4s ease-out; }
@keyframes spiller {
  0% { box-shadow: 0 0 0 0 rgba(198, 91, 65, 0.55); }
  100% { box-shadow: 0 0 0 18px rgba(198, 91, 65, 0); }
}

/* Hør forskjellen-demo */
.demo {
  margin-top: 3rem;
  border: 1.5px solid var(--ebony);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  background: var(--ivory-dark);
}
.demo h3 { font-size: 1.3rem; margin-top: 0; }
.demo p { max-width: 58ch; color: var(--ink-soft); }
.demo-knapper { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 1.1rem; }

/* Pianostreng-scrollbar */
.streng {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--felt-bright), #dfa86a);
  box-shadow: 0 0 8px rgba(198, 91, 65, 0.55);
  pointer-events: none;
}

/* Parallax-stripe mellom seksjoner */
.parallax-band {
  height: 34vh;
  min-height: 220px;
  background-color: var(--ebony);
  /* Kobberrust-duotone over tangentene */
  background-image:
    linear-gradient(180deg, rgba(27, 22, 19, 0.55), rgba(122, 58, 27, 0.38)),
    url('hero-piano.jpg');
  background-size: cover;
  background-position: center 72%;
  background-attachment: fixed;
}

/* Seksjoner */
.section {
  max-width: 64rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}
.section-alt {
  max-width: none;
  background: var(--ivory-dark);
}
.section-inner { max-width: 61rem; margin: 0 auto; }
.section h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
.section-intro { max-width: 52ch; }

/* Steg */
.steps {
  list-style: none;
  counter-reset: steg;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.steps li { counter-increment: steg; }
.steps li::before {
  content: counter(steg);
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--felt);
  margin-bottom: 0.25rem;
}
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 0; color: var(--ink-soft); }

/* Pris */
.price-card {
  background: var(--ivory);
  border: 1.5px solid var(--ebony);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  margin-top: 2rem;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.price-name { font-family: var(--font-display); font-size: 1.25rem; }
.price-amount { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.price-note { margin: 0.75rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* Om */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem;
  align-items: center;
}
.about-photo {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1.5px solid var(--ebony);
}

/* Skjema */
.contact-form { max-width: 40rem; margin-top: 1.5rem; }
.hp-field { position: absolute; left: -9999px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}
.contact-form p { margin: 0 0 1.1rem; }
.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ebony);
  background: var(--ivory);
  border: 1.5px solid var(--ink-soft);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
}
.contact-form textarea { resize: vertical; }

/* Spillbart klaviatur — mørk opptakt til footeren */
.klaviatur-scene {
  background: var(--ebony);
  padding: 3.5rem 1.5rem 0.5rem;
  text-align: center;
}
.klaviatur-tekst {
  color: var(--ivory-soft);
  font-family: var(--font-display);
  font-style: italic;
  margin: 0 0 1.5rem;
}
.klaviatur {
  position: relative;
  max-width: 34rem;
  height: 150px;
  margin: 0 auto;
  display: flex;
}
.key {
  padding: 0;
  border-radius: 0 0 5px 5px;
  cursor: pointer;
}
.key.white {
  flex: 1 1 0;
  background: var(--ivory);
  border: 1px solid #0d0a08;
  height: 100%;
}
.key.black {
  position: absolute;
  top: 0;
  width: 7.5%;
  height: 60%;
  background: #0d0a08;
  border: 1px solid rgba(245, 241, 232, 0.35);
  z-index: 2;
}
.key.is-down { transform: translateY(2px); filter: brightness(0.92); }

/* Scroll-reveal — kun når JS kjører; av ved redusert bevegelse */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Footer — mørk scene igjen */
.site-footer {
  background: var(--ebony);
  color: var(--ivory-soft);
  padding: 3rem 1.5rem 3.5rem;
  text-align: center;
  font-size: 0.95rem;
}
.site-footer a { color: var(--felt-lys); }
.footer-logo { height: 56px; width: auto; margin-bottom: 1rem; }

/* 404 — mørk scene */
.side-404 {
  background: var(--ebony);
  color: var(--ivory);
}
.feilscene {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
}
.feillogo { height: 64px; width: auto; margin-bottom: 2rem; }
.feilscene .eyebrow { color: var(--felt-bright); }
.feilscene h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
.feilscene p { max-width: 44ch; color: var(--ivory-soft); }
.feilknapper { display: flex; gap: 0.85rem; flex-wrap: wrap; justify-content: center; margin-top: 1.5rem; }

/* Takk-siden */
.thanks {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
}
.thanks h1 { margin-top: 1.5rem; }
.thanks p { max-width: 42ch; color: var(--ink-soft); }

/* Mobil — iOS støtter ikke fixed attachment; fall tilbake til statisk */
@media (max-width: 44rem) {
  .hero-stage, .parallax-band { background-attachment: scroll; }
  .hero { min-height: 66vh; padding-top: 4vh; }
  .parallax-band { height: 26vh; min-height: 160px; }
  .steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .about { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-photo { max-width: 24rem; }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 2.75rem 1.5rem; }
  .logo { height: 42px; }
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .hero-stage, .parallax-band { background-attachment: scroll; }
  .stov { display: none; }
}
