/* ==========================================================
   Jonasson Måleri och Design
   ========================================================== */

:root {
  --cream: #f8f6f1;     /* ivory */
  --paper: #efe9df;
  --sand: #e6dfd4;
  --ink: #1f342f;       /* forest – headings */
  --text: #3d4441;
  --muted: #5f6662;
  --gold: #8a6330;      /* text + buttons (AA contrast on ivory/white) */
  --gold-dark: #6f4f25;
  --gold-soft: #b18a52; /* brand gold – ornaments, icons, on dark */
  --green: #1f342f;     /* forest */
  --green-deep: #182925;
  --sage: #3f6b67;
  --line: #e0d7c8;

  --serif-display: "Playfair Display", Georgia, serif;
  --serif: "DM Sans", Arial, sans-serif;

  --container: 1180px;
  --radius-pill: 999px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif-display); color: var(--ink); font-weight: 400; line-height: 1.1; margin: 0; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Shared bits ---------- */
.eyebrow {
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: .74rem; font-weight: 500;
  color: var(--gold);
}

.ornament {
  --w: 260px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: var(--w); color: var(--gold);
  margin-inline: auto;
}
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .75; }
.ornament svg { width: 26px; height: 26px; flex: none; }
.ornament-left { margin-inline: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 48px; padding: .6em 1.9em;
  border-radius: var(--radius-pill);
  font-family: var(--serif); font-size: .98rem; font-weight: 500; text-decoration: none;
  border: 1.5px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  cursor: pointer; white-space: nowrap;
}
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn-outline:hover { background: var(--gold); color: #fff; }
.btn-ghost-light { border-color: rgba(194,154,91,.7); color: #f4ead8; }
.btn-ghost-light:hover { background: rgba(194,154,91,.18); }
.btn-sm { min-height: 40px; padding: .4em 1.5em; font-size: .98rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,247,241,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(221,210,191,.6);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 24px; }

.logo { display: grid; justify-items: center; text-decoration: none; color: var(--ink); line-height: 1; }
.logo-name {
  font-family: var(--serif-display); font-weight: 400;
  font-size: 1.55rem; letter-spacing: .28em; padding-left: .28em; text-transform: uppercase;
}
.logo-rule { display: flex; align-items: center; gap: 6px; width: 100%; color: var(--gold); margin: 3px 0 4px; }
.logo-rule::before, .logo-rule::after { content: ""; flex: 1; height: 1px; background: var(--gold-soft); }
.logo-rule svg { width: 11px; height: 11px; }
.logo-tag { font-family: var(--serif-display); font-size: .62rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); padding-left: .42em; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) {
  text-decoration: none; font-size: .95rem; color: var(--text);
  position: relative; padding: 6px 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: var(--gold); transform: scaleX(0); transition: transform .25s;
}
.nav a:not(.btn):hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--gold); }
.nav-cta { margin-left: 8px; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 30%, #fbf8f2 0%, transparent 60%),
    var(--paper);
  min-height: clamp(520px, 72vh, 640px);
  display: flex; align-items: center;
}
.hero-art {
  position: absolute; inset: 0 0 0 40%;
  background:
    linear-gradient(rgba(248,246,241,.38), rgba(248,246,241,.38)),
    url("assets/img/hero-texture.jpg") right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
}
/* Påfågeln har vit bakgrund – multiply gör den vita ytan genomskinlig mot texturen. */
.hero-peacock {
  position: absolute; right: 2%; bottom: 0;
  height: 96%; width: auto; max-height: 560px;
  mix-blend-mode: multiply;
}
.hero-inner { position: relative; padding-block: 72px; }
.hero-copy { max-width: 560px; }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.2rem); margin: 18px 0 26px; letter-spacing: -.01em; }
.hero .ornament { --w: 250px; margin-bottom: 26px; }
.lead { font-size: 1.125rem; color: var(--text); max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.actions .btn { min-width: 178px; }

/* ---------- Services ---------- */
.services { background: var(--cream); padding-block: 26px; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.service { text-align: center; padding: 20px 26px; }
.service + .service { border-left: 1px solid var(--line); }
.icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  fill: none; stroke: var(--gold-soft);
  stroke-width: 2;
  stroke-linejoin: round; stroke-linecap: round;
}
.service h2 { font-size: 1.4rem; margin-bottom: 10px; }
.service p { font-size: .95rem; color: var(--muted); max-width: 24ch; margin-inline: auto; }

/* ---------- Projects ---------- */
.projects {
  position: relative;
  background: var(--green) url("assets/img/dark-green-texture.jpg") center / cover no-repeat;
  color: #efe6d6;
  padding: 44px 0 38px;
}
.section-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 26px; }
.section-title { grid-column: 2; text-align: center; }
.section-head > .btn { grid-column: 3; justify-self: end; }
.projects h2 { color: #f6eee0; font-size: clamp(2.1rem, 3.8vw, 2.8rem); margin: 4px 0 10px; }
.projects .eyebrow { color: var(--gold-soft); }
.projects .ornament { --w: 220px; color: var(--gold-soft); }

.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.project { text-align: center; }
.project h3 {
  font-family: var(--serif); font-weight: 400; font-size: .98rem; color: #efe6d6;
  margin-top: 14px; padding-bottom: 12px; position: relative;
}
.project h3::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 36px; height: 2px;
  background: var(--gold-soft); transform: translateX(-50%);
  transition: width .3s;
}
.project:hover h3::after { width: 70px; }

.project-img { aspect-ratio: 5 / 3; overflow: hidden; background: var(--green-deep); }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project:hover .project-img img { transform: scale(1.04); }

/* Utvalt referensprojekt */
.featured-ref {
  display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 28px;
  margin-top: 28px; padding: 14px; text-decoration: none;
  border: 1px solid rgba(194,154,91,.35); background: rgba(24,41,37,.45);
  transition: border-color .3s, background .3s;
}
.featured-ref:hover { border-color: var(--gold-soft); background: rgba(24,41,37,.7); }
.featured-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.featured-ref:hover .featured-img img { transform: scale(1.04); }
.featured-copy { display: grid; gap: 8px; justify-items: start; }
.featured-copy .eyebrow { color: var(--gold-soft); }
.featured-title { font-family: var(--serif-display); font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: #f6eee0; line-height: 1.15; }
.featured-text { font-size: .98rem; color: #d9cfbd; max-width: 56ch; }
.featured-link { color: var(--gold-soft); font-weight: 500; display: inline-flex; gap: .6em; }
.featured-ref:hover .arrow { transform: translateX(4px); }
.featured-link .arrow { transition: transform .2s; }
@media (max-width: 600px) {
  .featured-ref { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.15fr 1fr; background: var(--cream); overflow: hidden; }
.about-copy {
  position: relative;
  padding: 34px clamp(16px, 8vw, 82px) 40px;
  align-self: center;
  max-width: 600px; margin-left: auto; width: 100%;
}
.about h2 { font-size: clamp(1.9rem, 3.4vw, 2.4rem); margin: 12px 0 18px; }
.about-flourish {
  position: absolute; left: -150px; top: 50%; translate: 0 -50%;
  width: 170px; height: auto; mix-blend-mode: multiply; opacity: .7; pointer-events: none;
}
.about-copy > :not(.about-flourish) { position: relative; }
.about-copy p:not(.eyebrow) { font-size: 1rem; margin-bottom: 22px; max-width: 52ch; }
.about-img {
  position: relative; min-height: 340px; overflow: hidden; background: var(--sand);
}
.about-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  background:
    linear-gradient(90deg, rgba(24,41,37,.9), rgba(24,41,37,.78) 50%, rgba(24,41,37,.9)),
    url("assets/img/interior-dining.jpg") center / cover no-repeat,
    var(--green);
  color: #efe6d6;
  padding: 40px 0 44px;
  text-align: center;
}
.contact-inner { display: grid; justify-items: center; gap: 10px; }
.contact .eyebrow { color: var(--gold-soft); }
.eyebrow-lined { display: flex; align-items: center; gap: 14px; width: min(100%, 520px); justify-content: center; }
.eyebrow-lined::before, .eyebrow-lined::after { content: ""; flex: 1; height: 1px; background: var(--gold-soft); opacity: .7; }
.contact h2 { color: #f6eee0; font-size: clamp(1.7rem, 3.2vw, 2.15rem); }
.contact-lines { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 1.02rem; margin-bottom: 8px; }
.contact-lines a { text-decoration: none; }
.contact-lines a:hover { color: var(--gold-soft); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: #b9b3a5; font-size: .92rem; border-top: 1px solid rgba(194,154,91,.25); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; padding-block: 16px; flex-wrap: wrap; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--gold-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { gap: 20px; }
  .logo-name { font-size: 1.45rem; }
}

@media (max-width: 920px) {
  :root { --header-h: 66px; }
  .nav-toggle {
    display: grid; gap: 5px; place-content: center;
    width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  }
  .nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform .25s, opacity .25s; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav-cta { margin: 16px 0 0; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service:nth-child(3) { border-left: 0; }
  .service:nth-child(n+3) { border-top: 1px solid var(--line); }

  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head { grid-template-columns: 1fr; gap: 18px; }
  .section-title { grid-column: 1; }
  .section-head > .btn { grid-column: 1; justify-self: center; grid-row: 3; }
  .projects .project-grid { margin-bottom: 8px; }

  .about { grid-template-columns: 1fr; }
  .about-flourish { display: none; }
  .about-copy { margin: 0; max-width: none; padding-inline: 16px; }
  .about-img { min-height: 280px; }
}

@media (max-width: 720px) {
  .hero { min-height: 0; flex-direction: column; align-items: stretch; }
  .hero-inner { padding-block: 44px 8px; }
  .hero-art {
    position: relative; inset: auto; height: 340px; order: 2;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 25%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 25%);
  }
  .hero-peacock { right: 50%; translate: 50% 0; height: 100%; }
  .lead { font-size: 1.1rem; }
  .actions .btn { flex: 1 1 100%; }
  .contact-lines { flex-direction: column; align-items: center; }
  .contact-lines span { display: none; }
  .logo-name { font-size: 1.3rem; letter-spacing: .24em; padding-left: .24em; }
  .logo-tag { font-size: .54rem; letter-spacing: .26em; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .project-grid { gap: 10px; }
  .project h3 { font-size: .95rem; }
  .service + .service { border-left: 0; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
