/*
 * Akabe design tokens + global layer.
 * Loaded after every vendor stylesheet; those sheets declare their variables on `*`,
 * so overrides must target `*` as well (not just :root) to win per element.
 */

:root,
* {
  /* palette */
  --paper: #f6f3eb;
  --paper-2: #efe9dd;
  --sand: #e8e0cf;
  --line: #ddd5c4;
  --line-strong: #c9bea6;
  --ink: #1b1e22;
  --ink-soft: #4a463f;
  --muted: #6b655b; /* ≥4.5:1 on paper for small labels */
  --espresso: #221a15;
  --espresso-2: #2c231d;
  --brass: #b08d57;
  --brass-deep: #8a6b3d;
  --brass-light: #d7c3a0;
  --brass-rgb: 176, 141, 87;

  /* legacy aliases used by inner pages */
  --akabe-paper: var(--paper);
  --akabe-ink: var(--ink);
  --akabe-muted: var(--muted);
  --akabe-line: var(--line);

  /* Vendor bindings */
  --primary-color: var(--brass);
  --primary-color-rgb: var(--brass-rgb);
  --secondary-color: var(--brass-deep);
  --secondary-color-rgb: 138, 107, 61;
  --bg-default: var(--paper);
  --bg-light: var(--paper-2);
  --bg-dark-1: var(--espresso);
  --bg-dark-2: var(--espresso-2);
  --bg-dark-3: #3a2f27;
  --bg-dark-1-rgb: 34, 26, 21;
  --footer-background-color: var(--espresso);
  --border-color: var(--line);
  --container-max-width: 1320px;
  --rounded-1: 2px;

  /* typography */
  --font-display-stack: var(--font-display, "Fraunces", Georgia, "Times New Roman", serif);
  --font-sans-stack: var(--font-sans, "Manrope", "Helvetica Neue", Arial, sans-serif);
  --body-font: var(--font-sans-stack);
  --heading-font: var(--font-display-stack);
  --alt-font-1: var(--font-sans-stack);
  --body-font-size: 17px;
  --body-font-color: rgba(27, 30, 34, 0.78);
  --body-font-color-bg-dark: rgba(246, 243, 235, 0.78);
  --body-font-weight: 400;
  --body-font-letter-spacing: 0;
  --body-font-line-height: 1.65;
  --heading-font-weight: 400;
  --heading-font-color: var(--ink);
  --heading-font-color-bg-dark: var(--paper);
  --heading-text-transform: none;

  --h1-font-size: clamp(3.25rem, 1.6rem + 6.2vw, 7.75rem);
  --h1-letter-spacing: -0.03em;
  --h1-line-height: 0.98;
  --h1-margin-bottom: 0.4em;
  --h2-font-size: clamp(2.125rem, 1.35rem + 2.9vw, 4.25rem);
  --h2-letter-spacing: -0.025em;
  --h2-line-height: 1.04;
  --h2-margin-bottom: 0.5em;
  --h3-font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  --h3-letter-spacing: -0.015em;
  --h3-line-height: 1.2;
  --h3-margin-bottom: 0.5em;
  --h4-font-size: 1.25rem;
  --h4-letter-spacing: -0.01em;
  --h4-line-height: 1.3;
  --h5-font-size: 1.0625rem;
  --h5-line-height: 1.4;
  --h6-font-size: 0.9375rem;

  --mainmenu-font: var(--font-sans-stack);
  --mainmenu-font-size: 14px;
  --mainmenu-font-weight: 500;
  --mainmenu-letter-spacing: 0.01em;
  --mainmenu-text-transform: none;

  --subtitle-font: var(--font-sans-stack);
  --subtitle-font-size: 12px;
  --subtitle-font-weight: 600;
  --subtitle-color: var(--brass);
  --subtitle-color-dark: var(--brass-light);
  --subtitle-letter-spacing: 0.18em;
  --subtitle-text-transform: uppercase;
  --subtitle-margin-bottom: 18px;

  --btn-font-family: var(--font-sans-stack);
  --btn-font-size: 13px;
  --btn-font-weight: 600;
  --btn-letter-spacing: 0.08em;
  --btn-padding: 14px 28px;
  --btn-rounded: 999px;
  --btn-text-transform: uppercase;

  /* rhythm */
  --section-y: clamp(80px, 9vw, 150px);
  --gutter: clamp(20px, 3vw, 40px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/*
 * Metric-matched fallbacks for Fraunces at display optical size (opsz 144),
 * measured against the live headline: Times ≈ 94.3%, Georgia ≈ 85.6% of the
 * web-font advance width. Keeps line breaks stable across the font swap.
 */
@font-face {
  font-family: "Fraunces Fallback Times";
  src: local("Times New Roman"), local("TimesNewRomanPSMT");
  size-adjust: 94.3%;
  ascent-override: 103.7%;
  descent-override: 27%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Fraunces Fallback Georgia";
  src: local("Georgia");
  size-adjust: 85.6%;
  ascent-override: 114.3%;
  descent-override: 29.8%;
  line-gap-override: 0%;
}

/*
 * Minimal reboot. The homepage loads without Bootstrap or the vendor sheets, so the few
 * defaults our components rely on live here; values mirror Bootstrap reboot
 * so inner pages (which still load it) render identically.
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--body-font-color);
  font-family: var(--body-font);
  font-size: var(--body-font-size);
  line-height: var(--body-font-line-height);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

#wrapper {
  min-height: 100vh;
  position: relative;
}

/* Subtle paper grain over everything; multiply keeps it invisible on dark. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20000;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(var(--brass-rgb), 0.35);
  color: var(--ink);
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: var(--heading-font);
  font-weight: var(--heading-font-weight);
  color: var(--heading-font-color);
  text-transform: none;
  text-wrap: balance;
  font-variation-settings: "opsz" 144;
}

h3,
.h3 {
  font-variation-settings: "opsz" 72;
}

h4,
h5,
h6,
.h4,
.h5,
.h6 {
  font-variation-settings: "opsz" 36;
}

/* Scale (the vendor sheet applies the same variables; declared here so the homepage
   renders identically without the vendor stylesheet). */
h1,
.h1 {
  font-size: var(--h1-font-size);
  line-height: var(--h1-line-height);
  letter-spacing: var(--h1-letter-spacing);
  margin-bottom: var(--h1-margin-bottom);
}

h2,
.h2 {
  font-size: var(--h2-font-size);
  line-height: var(--h2-line-height);
  letter-spacing: var(--h2-letter-spacing);
  margin-bottom: var(--h2-margin-bottom);
}

h3,
.h3 {
  font-size: var(--h3-font-size);
  line-height: var(--h3-line-height);
  letter-spacing: var(--h3-letter-spacing);
  margin-bottom: var(--h3-margin-bottom);
}

h4,
.h4 {
  font-size: var(--h4-font-size);
  line-height: var(--h4-line-height);
  letter-spacing: var(--h4-letter-spacing);
}

h5,
.h5 {
  font-size: var(--h5-font-size);
  line-height: var(--h5-line-height);
}

h6,
.h6 {
  font-size: var(--h6-font-size);
}

.text-light h1,
.text-light h2,
.text-light h3,
.text-light h4,
.text-light h5,
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--heading-font-color-bg-dark);
}

p {
  margin-top: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
}

section {
  padding: var(--section-y) 0;
}

section.no-top {
  padding-top: 0;
}

section.no-bottom {
  padding-bottom: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

img,
video {
  max-width: 100%;
  height: auto;
}

img,
svg {
  vertical-align: middle;
}

h1,
h2,
h3,
h4,
h5,
h6,
dl,
ol,
ul,
figure {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

dd {
  margin-left: 0;
}

address {
  margin-bottom: 1rem;
  font-style: normal;
  line-height: inherit;
}

b,
strong {
  font-weight: 600;
}

button,
input,
select,
textarea {
  margin: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  border-radius: 0;
  text-transform: none;
  -webkit-appearance: button;
  appearance: button;
}

button:not(:disabled) {
  cursor: pointer;
}

/* Accessibility */
.ak-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30000;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 14px;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
}

.ak-skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  color: var(--paper);
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Shared primitives ---------- */

/* Micro label: "01 — Kurumsal" */
.subtitle,
.ak-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--subtitle-margin-bottom);
  font-family: var(--font-sans-stack);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  background: none;
  padding: 0;
  border-radius: 0;
}

.ak-label__num {
  font-family: var(--font-display-stack);
  font-variation-settings: "opsz" 36;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--brass-deep);
}

.ak-label__num::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-left: 12px;
  background: currentColor;
  opacity: 0.6;
  vertical-align: middle;
}

.text-light .ak-label,
.section-dark .ak-label,
.text-light .subtitle {
  color: var(--brass-light);
}

.text-light .ak-label__num {
  color: var(--brass-light);
}

.ak-lead {
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

.text-light .ak-lead {
  color: rgba(246, 243, 235, 0.8);
}

.ak-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
  opacity: 1;
}

.text-light .ak-rule {
  border-color: rgba(246, 243, 235, 0.14);
}

/* Buttons */
.ak-btn,
.btn-main {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: var(--btn-padding);
  border-radius: var(--btn-rounded);
  font-family: var(--font-sans-stack);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  letter-spacing: var(--btn-letter-spacing);
  text-transform: var(--btn-text-transform);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  background: var(--brass);
  color: var(--espresso); /* 6.3:1 on brass; white would fail AA */
  border: 1px solid var(--brass);
  overflow: hidden;
  transition:
    background-color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out),
    color 0.3s var(--ease-out),
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.ak-btn::before,
.btn-main::before {
  display: none;
}

.ak-btn:hover,
.btn-main:hover {
  background: var(--brass-light);
  border-color: var(--brass-light);
  color: var(--espresso);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -12px rgba(var(--brass-rgb), 0.8);
}

.ak-btn .ak-btn__arrow {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  transition: transform 0.35s var(--ease-out);
}

.ak-btn .ak-btn__arrow svg {
  width: 14px;
  height: 14px;
  display: block;
}

.ak-btn:hover .ak-btn__arrow {
  transform: translateX(4px);
}

.ak-btn--outline,
.btn-main.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.ak-btn--outline:hover,
.btn-main.btn-line:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

.text-light .ak-btn--outline,
.text-light .btn-main.btn-line,
.ak-btn--outline.is-light {
  color: var(--paper);
  border-color: rgba(246, 243, 235, 0.35);
}

.text-light .ak-btn--outline:hover,
.text-light .btn-main.btn-line:hover,
.ak-btn--outline.is-light:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.ak-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
  padding-left: 0;
  padding-right: 0;
}

.ak-btn--ghost:hover {
  background: transparent;
  border-color: transparent;
  color: var(--brass-deep);
  box-shadow: none;
  transform: none;
}

/* Text link with growing underline */
.ak-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans-stack);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 6px;
}

.ak-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0.35);
  opacity: 0.5;
  transition: transform 0.45s var(--ease-out), opacity 0.3s;
}

.ak-link:hover {
  color: var(--brass-deep);
}

.ak-link:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.text-light .ak-link {
  color: var(--paper);
}

.text-light .ak-link:hover {
  color: var(--brass-light);
}

/* Media frames: product photos are opaque white PNGs — multiply fuses them. */
.ak-media {
  position: relative;
  overflow: hidden;
  background: var(--sand);
  border-radius: var(--rounded-1);
}

.ak-media img,
.ak-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.ak-media img {
  object-fit: cover;
}

.ak-media--product img {
  object-fit: contain;
  mix-blend-mode: multiply;
  padding: 10%;
  filter: contrast(1.02) saturate(1.02);
}

.ak-media--zoom img {
  transition: transform 1.2s var(--ease-out);
  will-change: transform;
}

.ak-media--zoom:hover img,
a:hover .ak-media--zoom img,
.ak-card:hover .ak-media--zoom img {
  transform: scale(1.05);
}

/* Pills */
.ak-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  line-height: 1.3;
  white-space: nowrap;
}

/* Dark bands */
.ak-dark {
  background: var(--espresso);
  color: var(--body-font-color-bg-dark);
}

.ak-dark h1,
.ak-dark h2,
.ak-dark h3,
.ak-dark h4 {
  color: var(--paper);
}

.ak-dark .ak-label {
  color: var(--brass-light);
}

.ak-dark .ak-label__num {
  color: var(--brass-light);
}

.ak-dark .ak-chip {
  border-color: rgba(246, 243, 235, 0.18);
  color: rgba(246, 243, 235, 0.8);
}

/* Logo rendered monochrome via filter — the PNG is a transparent RGBA. */
.ak-logo img,
.akabe-logo-img {
  display: block;
  width: auto;
  height: 40px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

.ak-logo--ink img {
  filter: brightness(0) saturate(100%) opacity(0.92);
}

/* ---------- Inner pages (kept from previous iteration) ---------- */

.akabe-page-hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  padding: 176px 0 64px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
}

.akabe-page-hero .sw-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 16, 12, 0.55) 0%,
    rgba(20, 16, 12, 0.35) 45%,
    rgba(20, 16, 12, 0.72) 100%
  );
}

.akabe-page-hero .container {
  position: relative;
  z-index: 2;
}

.akabe-page-hero h1 {
  margin: 0 0 12px;
  color: #fff;
}

.akabe-page-hero p {
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.akabe-page-hero .breadcrumb-line {
  opacity: 0.85;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.akabe-page-hero .breadcrumb-line a {
  color: #fff;
}

.akabe-rich-text p {
  margin-bottom: 1rem;
}

.akabe-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--rounded-1);
}

.akabe-map-embed {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: var(--rounded-1);
}

.akabe-process-step {
  border-left: 1px solid var(--brass);
  padding-left: 20px;
  margin-bottom: 28px;
}

.akabe-process-step .step-num {
  color: var(--brass);
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 12px;
  margin-bottom: 6px;
}

.akabe-product-card img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  width: 100%;
  background: var(--sand);
  mix-blend-mode: multiply;
  padding: 8%;
}

.akabe-compare-table {
  width: 100%;
  border-collapse: collapse;
}

.akabe-compare-table th,
.akabe-compare-table td {
  border: 1px solid var(--line);
  padding: 12px;
  vertical-align: top;
  text-align: center;
}

.akabe-compare-table img {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.akabe-form .form-control,
.akabe-form input:not([type="checkbox"]):not([type="radio"]):not([type="number"]),
.akabe-form textarea,
.akabe-form select {
  width: 100%;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--rounded-1);
  background: #fff;
  font-family: var(--font-sans-stack);
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s;
}

.akabe-form .form-control:focus,
.akabe-form input:focus,
.akabe-form textarea:focus,
.akabe-form select:focus {
  border-color: var(--brass);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--brass-rgb), 0.18);
}

.akabe-form input[type="checkbox"],
.akabe-form input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--brass);
}

.akabe-form input[type="number"] {
  width: 72px;
  margin-bottom: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.akabe-form-steps {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.akabe-form-steps .step {
  opacity: 0.5;
  font-weight: 600;
}

.akabe-form-steps .step.is-active {
  opacity: 1;
  color: var(--brass);
}

.ak-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ak-form-status {
  margin: 0 0 14px;
  color: #8a3b32;
  font-size: 0.95rem;
}

.akabe-quote-product-list {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 8px 14px;
  margin-bottom: 16px;
}

.akabe-quote-product-list label {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

/* Floating WhatsApp */
.akabe-whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #1f1a16;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  transition: transform 0.3s var(--ease-out), background-color 0.3s;
}

.akabe-whatsapp-float svg {
  width: 26px;
  height: 26px;
}

.akabe-whatsapp-float:hover {
  color: #fff;
  background: #25d366;
  transform: translateY(-2px);
}

@media print {
  header,
  footer,
  .akabe-whatsapp-float,
  .no-print,
  body::after {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .akabe-page-hero {
    padding-top: 120px;
    min-height: 300px;
  }

  .akabe-whatsapp-float {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
