/* ==========================================================================
   BYB Bygg & Design AB — komponenter
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.75rem;
  background: var(--gold);
  color: var(--ink-text);
  font-family: var(--body); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; border-radius: var(--radius);
  border: 1px solid var(--gold);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s var(--ease);
  white-space: nowrap;
  min-height: 44px;
}
.btn:hover { background: var(--gold-deep); border-color: var(--gold-deep); transform: translateY(-2px); }
.btn-arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

.btn-outline {
  background: transparent; color: var(--ink-text);
  border: 1px solid rgba(244,241,233,0.4);
}
.btn-outline:hover { background: rgba(244,241,233,0.08); border-color: var(--gold-bright); color: var(--gold-pale); }

.btn-dark { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.btn-dark:hover { background: var(--ink-soft); border-color: var(--gold); color: var(--gold-pale); }

.btn-sm { padding: 0.65rem 1.25rem; font-size: 0.78rem; }

/* Header phone chip */
.header-phone {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.9rem; font-weight: 600; color: var(--ink-text);
  white-space: nowrap;
}
.header-phone svg { width: 17px; height: 17px; color: var(--gold-bright); flex-shrink: 0; }

.header-phone-mobile {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  color: var(--ink-text);
}
.header-phone-mobile svg { width: 20px; height: 20px; color: var(--gold-bright); }

.menu-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--ink-text); margin: 6px auto;
  transition: all 0.35s var(--ease);
}
.menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-links a {
  font-family: var(--body); font-size: 0.92rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--ink-text-faded);
  position: relative; padding: 0.3rem 0;
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px;
  background: var(--gold-bright); transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink-text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 1280px) {
  .nav-links a { font-size: 1.3rem; font-family: var(--display); text-transform: uppercase; }
}

/* Trust bar icons */
.trust-bar-list svg { width: 15px; height: 15px; color: var(--gold-bright); flex-shrink: 0; }

/* Service cards */
.service-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--paper-line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(18,17,16,0.14); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.service-card .service-image { aspect-ratio: 4/3; background: var(--paper-deep); overflow: hidden; }
.service-card .service-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.service-card:hover .service-image img { transform: scale(1.06); }
.service-card .service-body { padding: 1.6rem; display: flex; flex-direction: column; flex: 1; }
.service-card h3 { margin-bottom: 0.55rem; text-transform: none; }
.service-card p { font-size: 0.93rem; margin-bottom: 1.1rem; }
.service-card .service-link {
  margin-top: auto; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 700; display: inline-flex; align-items: center; gap: 0.4rem;
}
.service-card:hover .service-link .btn-arrow { transform: translateX(3px); }

/* Full service sections (tjanster.html) */
.service-detail {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  border-bottom: 1px solid var(--paper-line);
  align-items: center;
  scroll-margin-top: 96px;
}
.service-detail:last-child { border-bottom: none; }
@media (min-width: 860px) { .service-detail { grid-template-columns: 1fr 1.1fr; gap: 3.5rem; } }
.service-detail.reverse { direction: rtl; }
.service-detail.reverse > * { direction: ltr; }
.service-detail-visual { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--paper-deep); }
.service-detail-visual img { width: 100%; height: 100%; object-fit: cover; }
.service-detail-body .eyebrow { margin-bottom: 0.75rem; }
.service-detail-body h2 { margin-bottom: 0.85rem; }
.service-includes { display: flex; flex-wrap: wrap; gap: 0.6rem 1.1rem; margin: 1.25rem 0 1.5rem; }
.service-includes li { font-size: 0.9rem; color: var(--text-soft); display: flex; align-items: center; gap: 0.5rem; }
.service-includes li::before { content: '✓'; color: var(--gold-deep); font-weight: 700; }

/* Values */
.value-card { padding: 2rem 1.75rem; background: #fff; border: 1px solid var(--paper-line); border-radius: var(--radius); }
.value-card .value-icon { width: 42px; height: 42px; color: var(--gold-deep); margin-bottom: 1.1rem; }
.value-card h3 { margin-bottom: 0.6rem; color: var(--text); }
.value-card p { font-size: 0.94rem; color: var(--text-faded); }

/* Stats / counters */
.stat { text-align: center; }
.stat .stat-number {
  font-family: var(--display); font-size: clamp(2.1rem, 5vw, 3.1rem); font-weight: 700;
  color: var(--gold-pale); line-height: 1; margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.stat .stat-label { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-text-faded); }

/* Story / intro */
.story-visual { aspect-ratio: 4/5; background: var(--paper-deep); border-radius: var(--radius); overflow: hidden; }
.story-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Before / after case slider */
.before-after {
  position: relative; aspect-ratio: 4/3; border-radius: var(--radius);
  overflow: hidden; background: var(--ink); user-select: none;
  touch-action: pan-y;
  max-width: 100%;
}
.before-after img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}
.before-after .ba-after { clip-path: inset(0 0 0 var(--ba-pos, 50%)); }
.before-after .ba-tag {
  position: absolute; top: 1rem; z-index: 2;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(18,17,16,0.78); color: var(--ink-text); padding: 0.4rem 0.85rem; border-radius: 999px;
}
.before-after .ba-tag.before { left: 1rem; }
.before-after .ba-tag.after { right: 1rem; background: var(--gold); color: var(--ink); }
.before-after .ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--ba-pos, 50%);
  width: 3px; background: var(--gold-bright); z-index: 3;
  transform: translateX(-50%);
}
.before-after .ba-handle::after {
  content: '';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold-bright);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121110' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='8 5 3 12 8 19'/><polyline points='16 5 21 12 16 19'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: 20px 20px;
  box-shadow: 0 4px 14px rgba(18,17,16,0.35);
}
.before-after .ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-appearance: none; appearance: none;
  background: transparent; margin: 0; cursor: ew-resize; z-index: 4;
}
.before-after .ba-range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 100%; background: transparent; }
.before-after .ba-range::-moz-range-thumb { width: 44px; height: 100%; background: transparent; border: none; }
.before-after .ba-range::-moz-range-track { background: transparent; }

.case-thumbs { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.case-thumbs button {
  flex: 1; min-width: 0; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  border: 2px solid transparent; padding: 0; opacity: 0.65; transition: all 0.3s var(--ease);
}
.case-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.case-thumbs button.active, .case-thumbs button:hover { opacity: 1; border-color: var(--gold); }

/* Callout / signature project banner */
.callout {
  padding: 2rem 2.25rem; background: var(--paper-deep);
  border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}
.callout p { font-size: 1.05rem; line-height: 1.5; color: var(--text); margin: 0; max-width: none; font-weight: 500; }

/* CTA banner */
.cta-banner { background: var(--ink); color: var(--ink-text); text-align: center; overflow: hidden; }
.cta-banner h2 { color: var(--ink-text); margin-bottom: 1.25rem; }
.cta-banner p { color: var(--ink-text-faded); max-width: 540px; margin: 0 auto 2.1rem; }

/* FAQ accordion */
.accordion { border-top: 1px solid var(--paper-line); }
.accordion-item { border-bottom: 1px solid var(--paper-line); }
.accordion-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.5rem 0.25rem; text-align: left;
  font-family: var(--display); font-size: clamp(1rem, 1.6vw, 1.15rem); font-weight: 600;
  color: var(--text); min-height: 44px;
}
.accordion-trigger .accordion-icon {
  flex-shrink: 0; width: 22px; height: 22px; position: relative;
}
.accordion-trigger .accordion-icon::before, .accordion-trigger .accordion-icon::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--gold-deep); transition: transform 0.3s var(--ease);
}
.accordion-trigger .accordion-icon::before { width: 16px; height: 2px; }
.accordion-trigger .accordion-icon::after { width: 2px; height: 16px; }
.accordion-item.open .accordion-icon::after { transform: translate(-50%, -50%) rotate(90deg) scaleY(0); }
.accordion-panel {
  overflow: hidden; height: 0; transition: height 0.35s var(--ease);
}
.accordion-panel-inner { padding: 0 0.25rem 1.5rem; }
.accordion-panel-inner p { max-width: 70ch; }

/* Testimonial / reviews */
.review-card {
  padding: 1.9rem; background: #fff; border: 1px solid var(--paper-line);
  border-radius: var(--radius); display: flex; flex-direction: column; gap: 1rem;
}
.review-card .stars { color: var(--gold); letter-spacing: 0.1em; font-size: 0.95rem; }
.review-card p { font-size: 0.98rem; color: var(--text); }
.review-card .review-meta { font-size: 0.85rem; color: var(--text-faded); }
.review-placeholder {
  padding: 2.5rem; text-align: center; border: 1px dashed var(--paper-line);
  border-radius: var(--radius); background: var(--paper-deep);
}
.review-placeholder p { margin: 0 auto; max-width: 40ch; color: var(--text-soft); }

/* Contact info block */
.contact-info-block { padding: 2rem; background: var(--ink); color: var(--ink-text); border-radius: var(--radius); }
.contact-info-block h3 { color: var(--ink-text); margin-bottom: 1.4rem; }
.contact-line { display: flex; align-items: flex-start; gap: 0.85rem; margin-bottom: 1.1rem; font-size: 0.95rem; }
.contact-line:last-child { margin-bottom: 0; }
.contact-line svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 0.15rem; color: var(--gold-bright); }
.contact-line strong { color: var(--ink-text); display: block; margin-bottom: 0.15rem; }
.contact-line a { color: var(--ink-text-faded); }
.contact-line a:hover { color: var(--gold-bright); }

/* Map */
.map-wrapper {
  aspect-ratio: 4/3; background: var(--paper-deep); border-radius: var(--radius);
  overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center;
}
.map-wrapper iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-cookie-block {
  position: absolute; inset: 0;
  padding: 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  max-width: 100%; min-width: 0; box-sizing: border-box;
}
.map-cookie-block p { max-width: 34ch; }
.map-cookie-block svg { width: 46px; height: 46px; color: var(--text-faded); }
.map-cookie-block p { margin: 0; font-size: 0.9rem; }
.map-cookie-block button {
  font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700;
  color: var(--gold-deep); text-decoration: underline; text-underline-offset: 4px; min-height: 44px;
}

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-field { display: flex; flex-direction: column; gap: 0.5rem; }
.form-field label { font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-soft); font-weight: 600; }
.form-field input, .form-field textarea, .form-field select {
  font-family: var(--body); font-size: 1rem; color: var(--text);
  background: #fff; border: 1px solid var(--paper-line);
  border-radius: var(--radius); padding: 0.85rem 1rem; min-height: 44px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent);
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field.file-field { position: relative; }
.form-field input[type="file"] { padding: 0.7rem 1rem; cursor: pointer; }
.form-note { font-size: 0.82rem; color: var(--text-faded); }
.form-error { font-size: 0.85rem; color: #A83232; margin-top: 0.9rem; display: none; }
.form-error.show { display: block; }
.form-field .field-error {
  font-size: 0.78rem; color: #A83232; display: none;
}
.form-field.invalid input, .form-field.invalid textarea, .form-field.invalid select { border-color: #A83232; }
.form-field.invalid .field-error { display: block; }
.consent-row { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.85rem; color: var(--text-soft); }
.consent-row input { margin-top: 0.2rem; width: 18px; height: 18px; flex-shrink: 0; }

/* Honeypot spam trap — hidden from real visitors, still readable by bots that fill every field */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-success {
  display: none; text-align: center; padding: 3rem 1.5rem;
  background: var(--paper-deep); border-radius: var(--radius);
}
.form-success.show { display: block; }
.form-success .icon-check {
  width: 60px; height: 60px; border-radius: 50%; background: var(--gold);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem;
}
.form-success .icon-check svg { width: 28px; height: 28px; color: var(--ink); }
.form-success h3 { margin-bottom: 0.5rem; }

/* Site footer */
.site-footer { background: var(--ink); color: var(--ink-text-faded); padding: 3.5rem 0 1.75rem; }
.footer-trust {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  padding-bottom: 2.25rem; margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--ink-line);
  font-size: 0.82rem; letter-spacing: 0.02em; color: var(--ink-text-faded);
}
.footer-trust li::before { content: '✓ '; color: var(--gold-bright); }
.footer-brand { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 1.1rem; }
.footer-brand img { height: 40px; width: auto; }
.footer-brand strong { font-family: var(--display); font-size: 1.2rem; text-transform: uppercase; color: var(--ink-text); }
.footer-tagline { font-size: 0.92rem; max-width: 30ch; color: var(--ink-text-faded); }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-pale); margin-bottom: 1.1rem; font-family: var(--body); font-weight: 700; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { font-size: 0.92rem; color: var(--ink-text-faded); transition: color 0.25s var(--ease); }
.footer-col a:hover { color: var(--gold-bright); }
.footer-col p { color: var(--ink-text-faded); font-size: 0.92rem; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  padding-top: 1.75rem; margin-top: 2.5rem; border-top: 1px solid var(--ink-line);
  font-size: 0.8rem; color: rgba(244,241,233,0.45);
}
.footer-bottom-links { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.footer-bottom button, .footer-bottom a {
  font-size: 0.8rem; text-decoration: underline; text-underline-offset: 4px;
  color: rgba(244,241,233,0.45); min-height: 44px; display: inline-flex; align-items: center;
}
.footer-bottom button:hover, .footer-bottom a:hover { color: var(--gold-bright); }

/* Cookie banner */
.cookie-banner {
  position: fixed; bottom: 1.25rem; left: 1.25rem; right: 1.25rem;
  max-width: 460px; z-index: 1000;
  background: var(--ink); color: var(--ink-text);
  padding: 1.5rem 1.75rem; border-radius: 8px;
  box-shadow: 0 25px 55px rgba(0,0,0,0.35);
  transform: translateY(150%); opacity: 0;
  transition: all 0.5s var(--ease);
  border: 1px solid var(--ink-line);
}
.cookie-banner.show { transform: translateY(0); opacity: 1; }
.cookie-banner h4 { font-size: 1.05rem; color: var(--ink-text); margin-bottom: 0.6rem; text-transform: none; }
.cookie-banner p { font-size: 0.86rem; color: var(--ink-text-faded); margin-bottom: 1.25rem; max-width: none; }
.cookie-banner a { color: var(--gold-pale); text-decoration: underline; text-underline-offset: 3px; }
.cookie-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.cookie-buttons button {
  padding: 0.65rem 1.15rem; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700;
  border-radius: 999px; transition: all 0.25s var(--ease); min-height: 44px;
}
.cookie-accept { background: var(--gold); color: var(--ink-text); }
.cookie-accept:hover { background: var(--gold-deep); }
.cookie-decline { background: transparent; color: var(--ink-text); border: 1px solid rgba(244,241,233,0.4); }
.cookie-decline:hover { background: rgba(244,241,233,0.08); border-color: var(--ink-text); color: var(--ink-text); }
@media (max-width: 600px) {
  .cookie-banner { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; padding: 1.15rem 1.25rem; }
  .cookie-buttons button { flex: 1; }
}

/* Image gallery figures */
.image-grid figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--paper-deep); aspect-ratio: 1; }
.image-grid figure.tall { aspect-ratio: 3/4; }
.image-grid figure.wide { aspect-ratio: 4/3; }
.image-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease); }
.image-grid figure:hover img { transform: scale(1.05); }
.image-grid figcaption {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem 1.1rem;
  font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase; font-weight: 600; color: var(--ink-text);
  background: linear-gradient(transparent, rgba(18,17,16,0.85));
}
.tag-note {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faded); border: 1px solid var(--paper-line); border-radius: 999px; padding: 0.3rem 0.75rem;
}

/* Page header (inre sidor) */
.page-header { background: var(--ink); color: var(--ink-text); padding: clamp(5.5rem, 14vw, 8rem) 0 clamp(2.5rem, 6vw, 3.5rem); position: relative; overflow: hidden; }
.page-header h1 { color: var(--ink-text); margin-bottom: 0.9rem; }
.page-header p { color: var(--ink-text-faded); max-width: 56ch; }
.breadcrumb { display: flex; gap: 0.5rem; align-items: center; font-size: 0.8rem; color: var(--ink-text-faded); margin-bottom: 1.25rem; letter-spacing: 0.02em; text-transform: uppercase; }
.breadcrumb a:hover { color: var(--gold-bright); }

.ornament { display: inline-flex; gap: 0.5rem; color: var(--gold); margin-bottom: 1.5rem; }
.ornament span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Ortslista (startsidan) */
.ortslista h3 {
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-faded); margin-bottom: 1rem; font-family: var(--body); font-weight: 700;
}
.ortslista ul { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.ortslista ul:last-child { margin-bottom: 0; }
.ortslista a.tag-note {
  color: var(--text-soft); background: #fff;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
  min-height: 44px; display: inline-flex; align-items: center;
}
.ortslista a.tag-note:hover { border-color: var(--gold-deep); color: var(--gold-deep); }
