/* ==========================================================================
   FPH Management – fphm.se
   Statisk one-pager. Inga externa beroenden; Manrope självhostas.
   Monokrom, redaktionell design i linje med logotypen (svart/vitt).
   ========================================================================== */

/* ---- Fonter ---- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800; /* variabel font – en fil täcker alla vikter */
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
}

/* ---- Designtokens ---- */
:root {
  --ink: #1a1918;
  --body-color: #4b4a45;
  --muted: #797770;
  --bg: #faf9f6;
  --surface: #ffffff;
  --tint: #f3f2ed;
  --hairline: rgba(26, 25, 24, 0.14);
  --hairline-soft: rgba(26, 25, 24, 0.08);

  --font-heading: "Manrope", ui-sans-serif, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-s: 4px;

  --container: 1080px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section-pad: clamp(4rem, 9vw, 7rem);
}

/* ---- Bas ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.06; }
h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a {
  color: var(--ink);
  text-decoration: none;
}
a:hover { color: #000; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 2px;
}

img, svg { max-width: 100%; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Skip-länk ---- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.6em 1.2em;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-s);
}
.skip-link:focus-visible {
  top: 1rem;
  color: #fff;
}

/* ---- Logotyp ---- */
.logo {
  display: block;
  height: 60px;
  width: auto;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0.85);
  border-bottom: 1px solid var(--hairline-soft);
  transition: box-shadow 0.25s ease;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--bg); }
}
.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(26, 25, 24, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 0.75rem;
}

.brand { display: inline-block; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.25rem, 1.5vw, 1rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: inline-block;
  padding: 0.55em 0.8em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  border-radius: var(--radius-s);
}
.nav-list a:hover {
  background: var(--tint);
}

/* ---- Sektioner ---- */
.section {
  padding-block: var(--section-pad);
  scroll-margin-top: 5.5rem;
}
.section-tinted {
  background: var(--tint);
}

/* Redaktionell kicker: kort streck + glesad versal */
.kicker {
  margin: 0 0 1em;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--ink);
  margin-right: 0.9em;
  vertical-align: 0.22em;
}

.section-intro {
  max-width: 58ch;
  margin-bottom: 3rem;
}

.prose {
  max-width: 65ch;
}
.prose p:last-child { margin-bottom: 0; }

/* ---- Hero ---- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(480px, 72vh, 720px);
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--hairline-soft);
}

.hero-watermark {
  position: absolute;
  right: -4%;
  bottom: -18%;
  width: clamp(300px, 42vw, 560px);
  height: auto;
  fill: var(--ink);
  opacity: 0.045;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 880px;
  margin-inline: 0;
  margin-left: calc((100% - var(--container)) / 2);
  padding-block: var(--section-pad);
}
@media (max-width: 1120px) {
  .hero-inner { margin-left: 0; }
}

.hero-sub {
  max-width: 54ch;
  font-size: clamp(1.1rem, 1.9vw, 1.25rem);
  margin-bottom: 2.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ---- Knappar ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.85em 1.8em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius-s);
  transition: background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, transform 0.2s ease;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover {
  background: #000;
  color: #fff;
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

/* ---- Pelare: Starta / Utveckla / Förvalta ---- */
.grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.pillar {
  border-top: 2px solid var(--ink);
  padding-top: 1.4rem;
}
.pillar h3 { margin-bottom: 0.5em; }
.pillar p:last-child { margin-bottom: 0; font-size: 0.98rem; }

/* ---- Innehav: tre utvalda bolag ---- */
.grid-holdings { align-items: stretch; }
.holding {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--ink);
  padding-top: 1.4rem;
}
.holding-tag {
  margin: 0 0 1.1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.holding h3 { margin-bottom: 0.5em; }
.holding p:not(.holding-tag) { font-size: 0.98rem; }
.holding-link {
  margin-top: auto;
  padding-top: 1.1rem;
  align-self: start;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}
.holding-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Tjänster: redaktionell lista med hårlinjer ---- */
.service-list {
  border-top: 1px solid var(--hairline);
  max-width: 60rem;
}
.service {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 1.8fr;
  gap: 1rem 3rem;
  padding-block: 2.4rem;
  border-bottom: 1px solid var(--hairline);
}
.service h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.service p {
  margin: 0;
  align-self: center;
}
@media (max-width: 680px) {
  .service { grid-template-columns: 1fr; gap: 0.8rem; }
}

/* ---- Kontakt ---- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 1.6fr;
  gap: 3rem 4rem;
  align-items: start;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-label {
  margin: 0 0 1.2rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-name {
  margin: 0 0 0.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-links li { margin-bottom: 0.35rem; }
.contact-links a {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1px;
}
.contact-links a:hover {
  border-bottom-color: var(--ink);
}

.contact-form {
  display: grid;
  gap: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-s);
  padding: clamp(1.4rem, 4vw, 2.2rem);
}
.form-field {
  display: grid;
  gap: 0.4rem;
}
.form-field label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}
.form-field input,
.form-field textarea {
  font: inherit;
  color: var(--body-color);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-s);
  padding: 0.65em 0.9em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(26, 25, 24, 0.12);
}
.form-field textarea { resize: vertical; min-height: 130px; }

/* Honeypot: dolt för människor, avvisas i mailer.php om ifyllt */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit {
  border: 0;
  cursor: pointer;
  margin-top: 0.3rem;
  justify-self: start;
}

.form-success {
  margin: 0 0 1.5rem;
  padding: 0.9em 1.2em;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-left-width: 4px;
  border-radius: var(--radius-s);
  color: var(--ink);
  font-weight: 500;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  color: #b5b3ac;
  padding-block: 3.5rem 2.5rem;
}
.footer-logo {
  display: block;
  height: 76px;
  width: auto;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  text-align: center;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav a,
.footer-mail {
  color: #d8d6cf;
  font-size: 0.95rem;
}
.footer-nav a:hover,
.footer-mail:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer :focus-visible { outline-color: #d8d6cf; }
.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: #8a8880;
}

/* ---- Scroll-reveal (endast med JS; utan JS syns allt direkt) ---- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
html.js .grid [data-reveal]:nth-child(2),
html.js .service-list [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
html.js .grid [data-reveal]:nth-child(3) { transition-delay: 0.16s; }

/* ---- Reducerad rörelse ---- */
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .btn-primary:hover,
  .btn-secondary:hover {
    transition: none;
    transform: none;
  }
}

/* ---- Responsivt ---- */
@media (max-width: 640px) {
  .header-inner {
    justify-content: center;
    padding-block: 0.6rem;
  }
  .nav-list { justify-content: center; }
  .nav-list a { padding: 0.5em 0.6em; font-size: 0.9rem; }
  .logo { height: 52px; }
  .section { scroll-margin-top: 8.5rem; }
  .hero-watermark { right: -20%; bottom: -10%; }
}
