:root {
  --primary: #D0AE95;
  --secondary: #E4C6AC;
  --brown: #4D2D18;
  --accent: #BA8975;
  --black: #000000;
  --white: #FFFFFF;
  --cream: #FBF7F2;
  --soft: #F4E8DD;
  /* Theme tokens: light values here, dark values under [data-theme="dark"]. */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-rgb: 255, 255, 255;
  --field: #FFFFFF;
  --text: #4D2D18;
  --ink: 77, 45, 24;
  --shadow-ink: 77, 45, 24;
  --brand: #4D2D18;
  --on-brand: #FFFFFF;
  --label: #BA8975;
  --danger: #9d392f;
  --success: #326b3f;
  --hero-bg:
    radial-gradient(circle at 82% 20%, rgba(228, 198, 172, 0.38), transparent 34%),
    linear-gradient(180deg, #fff 0%, #fbf7f2 100%);
  --line: rgba(var(--ink), 0.14);
  --shadow: 0 22px 60px rgba(var(--shadow-ink), 0.12);
  --font-body: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Dark mode: soft near-black browns for backgrounds (smooth section breaks),
   brand guideline colours for text, buttons and logo (Brand Guideline p.14). */
[data-theme="dark"] {
  --bg: #140D08;
  --surface: #1F1610;
  --surface-rgb: 31, 22, 16;
  --field: #FFFFFF;
  --text: #FFFFFF;
  --ink: 255, 255, 255;
  --shadow-ink: 0, 0, 0;
  --brand: #D0AE95;
  --on-brand: #4D2D18;
  --cream: #1A120C;
  --soft: #2B1E15;
  --label: #D0AE95;
  --danger: #F08C80;
  --success: #86C996;
  --hero-bg:
    radial-gradient(circle at 82% 20%, rgba(208, 174, 149, 0.12), transparent 36%),
    linear-gradient(180deg, #140D08 0%, #1A120C 100%);
  color-scheme: dark;
}

/* Form fields stay White with Brown Derby text, like the light theme. */
[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form select,
[data-theme="dark"] .contact-form textarea {
  color: #4D2D18;
  background: #FFFFFF;
  color-scheme: light;
}

[data-theme="dark"] .nav-menu a.is-active:not(.btn),
[data-theme="dark"] .profile-options a:hover,
[data-theme="dark"] .profile-options a:focus-visible,
[data-theme="dark"] .project-meta {
  background: rgba(0, 0, 0, 0.35);
}

/* Header, footer and the mobile menu in Brown Derby. */
[data-theme="dark"] .site-header {
  background: rgba(77, 45, 24, 0.9);
}

[data-theme="dark"] .footer {
  background: #4D2D18;
}

@media (max-width: 899px) {
  [data-theme="dark"] .nav-menu {
    background: #4D2D18;
  }
}

/* Guideline: on dark backgrounds the logo is all white. */
[data-theme="dark"] .brand-wordmark {
  filter: brightness(0) invert(1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: 84px 0;
}

.muted {
  background: var(--cream);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(var(--ink), 0.08);
  background: rgba(var(--surface-rgb), 0.88);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-wordmark {
  display: block;
  width: clamp(156px, 15vw, 210px);
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
}

.brand small {
  display: block;
  margin-top: -4px;
  color: var(--label);
  font-size: 0.75rem;
  font-weight: 600;
}

.nav-toggle {
  display: inline-grid;
  gap: 5px;
  width: 42px;
  height: 42px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: transform 0.24s ease, opacity 0.2s ease;
}

.nav-toggle:hover {
  border-color: rgba(var(--ink), 0.28);
  transform: translateY(-1px);
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  position: absolute;
  top: 74px;
  left: 20px;
  right: 20px;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: 0.22s ease;
}

.nav-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(var(--ink), 0.82);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-menu a:hover,
.nav-menu a.is-active {
  color: var(--text);
  background: var(--cream);
}

.nav-menu .btn,
.nav-menu .btn:hover,
.nav-menu .btn.is-active {
  color: var(--on-brand);
  background: var(--brand);
}

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--on-brand);
  background: var(--brand);
  box-shadow: 0 12px 24px rgba(var(--shadow-ink), 0.12);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.28) 42%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(var(--shadow-ink), 0.18);
}

.btn:hover::after {
  transform: translateX(120%);
}

.btn-small {
  min-height: 42px;
  padding-inline: 18px;
}

.btn > span,
.btn-icon {
  position: relative;
  z-index: 1;
}

.btn-icon {
  width: 18px;
  height: 18px;
  margin-right: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.whatsapp-icon {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: none;
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--primary);
  box-shadow: none;
}

.btn-light {
  color: var(--brown);
  background: var(--white);
  border-color: var(--white);
}

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 46px;
  /* Beranda/logo links (#home) scroll to the very top instead of under the sticky header. */
  scroll-margin-top: 200px;
  padding-bottom: 56px;
  background: var(--hero-bg);
}

.hero-grid {
  display: grid;
  gap: 44px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--label);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  line-height: 1.08;
}

h1 {
  max-width: 700px;
  margin-bottom: 18px;
  color: var(--text);
  font-size: min(clamp(2.35rem, 6.2vw, 4.2rem), calc((100vw - 48px) / 10.8));
  font-weight: 700;
}

/* "Tentang KRYA Creative" (~11.4em) stays on one line; size follows the column width. */
.about-title {
  white-space: nowrap;
  font-size: min(clamp(2rem, 5vw, 3.25rem), calc((100vw - 44px) / 11.8));
}

/* Client wants "yang Rapi, Berkesan," kept on one line. */
.keep-line {
  white-space: nowrap;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 3.25rem);
}

h3 {
  line-height: 1.25;
}

.hero-copy p,
.section-heading p,
.about-copy,
.contact-copy p {
  color: rgba(var(--ink), 0.75);
}

.hero-copy p {
  max-width: 660px;
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-visual {
  position: relative;
}

.carousel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--ink), 0.12);
  border-radius: 28px;
  background: var(--soft);
  box-shadow: var(--shadow);
  touch-action: pan-y;
  user-select: none;
}

.hero-carousel {
  aspect-ratio: 3 / 2;
}

.about-carousel {
  aspect-ratio: 16 / 10;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--brown);
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.carousel-arrow:hover {
  background: var(--white);
}

.carousel-arrow.prev {
  left: 14px;
}

.carousel-arrow.next {
  right: 14px;
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  z-index: 1;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.carousel-dot.is-active {
  width: 28px;
  background: var(--white);
}

.gallery-placeholder span,
.project-thumb span {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(var(--ink), 0.16);
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.56);
  color: rgba(var(--ink), 0.74);
  font-size: 0.78rem;
  font-weight: 800;
}

.quick-info {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.quick-info article {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(var(--surface-rgb), 0.72);
}

.quick-info strong,
.quick-info span {
  display: block;
}

.quick-info strong {
  font-size: 1.2rem;
}

.quick-info span {
  color: rgba(var(--ink), 0.66);
}

.split,
.contact-grid {
  display: grid;
  gap: 34px;
}

.about-layout {
  display: grid;
  gap: 34px;
  align-items: center;
}

.about-media {
  position: relative;
}



.quick-info,
.values-grid,
.services-grid,
.projects-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(186, 137, 117, 0.38) transparent;
}

.quick-info::-webkit-scrollbar,
.values-grid::-webkit-scrollbar,
.services-grid::-webkit-scrollbar,
.projects-grid::-webkit-scrollbar {
  height: 7px;
}

.quick-info::-webkit-scrollbar-thumb,
.values-grid::-webkit-scrollbar-thumb,
.services-grid::-webkit-scrollbar-thumb,
.projects-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(186, 137, 117, 0.34);
}

.values-grid,
.services-grid,
.projects-grid {
  display: grid;
  gap: 18px;
}

.values-grid {
  margin-top: 34px;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* Lifts the copy block (and the profile dropdown) above the value cards below it. */
.about-copy {
  position: relative;
  z-index: 5;
}

.profile-menu {
  position: relative;
}

.profile-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: grid;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-options[hidden] {
  display: none;
}

.profile-options a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.profile-options a:hover,
.profile-options a:focus-visible {
  background: var(--cream);
  outline: none;
}

.profile-options svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card,
.service-card,
.project-card,
.contact-form {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(var(--shadow-ink), 0.07);
}

.card,
.service-card {
  padding: 26px;
}

.card-number {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--primary);
  font-weight: 800;
}

.card p,
.service-card p,
.project-card p {
  margin-bottom: 0;
  color: rgba(var(--ink), 0.68);
}

.centered {
  text-align: center;
}

.centered p {
  max-width: 680px;
  margin-inline: auto;
}

.services-grid {
  margin-top: 30px;
}

.service-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card::before,
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 0 rgba(208, 174, 149, 0);
  transition: box-shadow 0.24s ease;
}

.service-card:hover,
.project-card:hover {
  border-color: rgba(186, 137, 117, 0.34);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-card:hover::before,
.project-card:hover::before {
  box-shadow: inset 0 0 0 1px rgba(208, 174, 149, 0.46);
}

.micro-cta {
  display: grid;
  gap: 18px;
  align-items: center;
  margin-top: 30px;
  padding: 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.micro-cta p {
  margin: 0;
  font-weight: 700;
}

.project-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: left;
  cursor: pointer;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover .project-thumb {
  transform: scale(1.015);
}

.project-card:focus-visible,
.btn:focus-visible,
.back-to-top:focus-visible,
.nav-toggle:focus-visible,
.modal-close:focus-visible,
.gallery-dot:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(186, 137, 117, 0.34);
  outline-offset: 3px;
}

.project-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 42%),
    linear-gradient(135deg, var(--soft), var(--primary));
  transition: transform 0.3s ease;
}

.project-thumb img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Shared warm grade so photos from different events read as one set. */
  filter: saturate(0.55) sepia(0.34) contrast(1.06) brightness(0.96);
}

.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(208, 174, 149, 0.22), rgba(77, 45, 24, 0.38));
  mix-blend-mode: multiply;
}

.project-thumb span {
  position: relative;
  z-index: 1;
}

.project-body {
  flex: 1;
  padding: 22px;
}

.project-body small {
  display: block;
  margin-bottom: 10px;
  color: var(--label);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.project-body h3 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: clamp(1.32rem, 1.05vw + 0.92rem, 1.72rem);
  line-height: 1.18;
}

.project-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.contact-links {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.contact-links a,
.footer-links a {
  color: var(--label);
  font-weight: 800;
}

.download-btn {
  width: fit-content;
}

#contact {
  padding-top: 56px;
}

.contact-panel {
  position: relative;
  overflow: hidden;
  padding: 42px 26px;
  border-radius: 28px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 40%),
    var(--brown);
  box-shadow: var(--shadow);
}

.contact-panel .eyebrow {
  color: var(--secondary);
}

.contact-copy h2 {
  max-width: 680px;
}

.contact-panel .contact-copy p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.78);
}

.whatsapp-cta {
  margin-top: 8px;
  box-shadow: 0 18px 34px rgba(28, 16, 9, 0.18);
}

.whatsapp-cta:hover {
  background: #fff7ef;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  color: var(--text);
}

.form-row {
  display: grid;
  gap: 7px;
}

label {
  font-weight: 800;
}

label span {
  color: rgba(var(--ink), 0.58);
  font-size: 0.9em;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--text);
  background: var(--field);
}

input,
select {
  min-height: 48px;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form > .btn {
  margin-top: 8px;
}

.error {
  display: none;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 700;
}

.error:not(:empty) {
  display: block;
  margin-top: 1px;
}

.success-message {
  min-height: 24px;
  margin: 0;
  color: var(--success);
  font-weight: 800;
}

.footer {
  position: relative;
  overflow: hidden;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  background: var(--cream);
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("assets/krya-pattern-contact.svg") center / cover no-repeat;
  opacity: 0.28;
}

.footer-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.footer p {
  margin: 0;
  color: rgba(var(--ink), 0.68);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 80px;
  z-index: 45;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  color: var(--on-brand);
  background: var(--brand);
  box-shadow: 0 18px 38px rgba(var(--shadow-ink), 0.22);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.theme-toggle {
  position: fixed;
  right: 122px;
  bottom: 22px;
  z-index: 45;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(var(--surface-rgb), 0.92);
  box-shadow: 0 14px 32px rgba(var(--shadow-ink), 0.16);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--label);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(186, 137, 117, 0.34);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

body.modal-open .theme-toggle {
  display: none;
}

.lang-switch {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.92);
  box-shadow: 0 14px 32px rgba(var(--shadow-ink), 0.16);
  backdrop-filter: blur(12px);
}

.lang-switch button {
  min-width: 40px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: rgba(var(--ink), 0.62);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch button:hover {
  color: var(--text);
}

.lang-switch button[aria-pressed="true"] {
  color: var(--on-brand);
  background: var(--brand);
}

.lang-switch button:focus-visible {
  outline: 3px solid rgba(186, 137, 117, 0.34);
  outline-offset: 2px;
}

body.modal-open .lang-switch {
  display: none;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background: var(--accent);
  box-shadow: 0 22px 46px rgba(var(--shadow-ink), 0.28);
  transform: translateY(-4px) scale(1.04);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.22s ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: 18px;
}

.modal.is-open {
  display: grid;
  place-items: center;
}

.modal.is-open .modal-backdrop {
  animation: modal-fade 0.2s ease both;
}

.modal.is-open .modal-panel {
  animation: modal-rise 0.24s ease both;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(186, 137, 117, 0.55) rgba(244, 232, 221, 0.65);
}

.modal-panel::-webkit-scrollbar {
  width: 10px;
}

.modal-panel::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(244, 232, 221, 0.7);
}

.modal-panel::-webkit-scrollbar-thumb {
  border: 2px solid rgba(244, 232, 221, 0.7);
  border-radius: 999px;
  background: rgba(186, 137, 117, 0.72);
}

.modal-close {
  position: sticky;
  top: 14px;
  left: calc(100% - 58px);
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(var(--shadow-ink), 0.08);
}

.modal-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-gallery {
  display: grid;
  gap: 14px;
  padding: 0 20px 22px;
}

.gallery-placeholder {
  position: relative;
  overflow: hidden;
  justify-self: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  transition: width 0.35s ease, height 0.35s ease;
  display: grid;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 48%),
    linear-gradient(135deg, var(--soft), var(--primary));
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.gallery-placeholder:active {
  cursor: grabbing;
}

.gallery-track {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gallery-track.is-dragging {
  transition: none;
}

.gallery-placeholder img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
}

.gallery-placeholder::after {
  content: none;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.gallery-hint {
  display: none;
  color: rgba(var(--ink), 0.52);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.gallery-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(186, 137, 117, 0.38);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.gallery-dots[hidden],
.gallery-hint[hidden] {
  display: none;
}

.gallery-dot.is-active {
  width: 28px;
  background: var(--brand);
}

.gallery-dot:hover {
  transform: translateY(-1px);
}

.modal-content {
  padding: 0 24px 28px;
}

.project-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 16px;
  background: var(--cream);
}

.project-meta div {
  display: grid;
  gap: 2px;
}

.project-meta dt {
  color: var(--label);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-meta dd {
  margin: 0;
  font-weight: 700;
}

#modal-highlights {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-pending {
  opacity: 1;
  transform: translateY(0);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 679px) {
  .modal {
    padding-top: max(42px, env(safe-area-inset-top));
  }

  .modal-panel {
    max-height: calc(100vh - max(58px, env(safe-area-inset-top)) - 18px);
    padding-top: 18px;
  }

  .modal-close {
    top: 16px;
    margin-bottom: 10px;
  }

  .modal-gallery {
    padding-top: 0;
  }

  .container {
    width: min(100% - 40px, 1120px);
  }

  .quick-info,
  .values-grid,
  .services-grid,
  .projects-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(272px, 82vw);
    gap: 14px;
    width: 100vw;
    margin-inline: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 20px 18px;
    scroll-padding-left: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .quick-info {
    grid-auto-columns: minmax(250px, 78vw);
    margin-left: calc(50% - 50vw);
  }

  .values-grid,
  .services-grid,
  .projects-grid {
    margin-left: calc(50% - 50vw);
  }

  .quick-info > *,
  .values-grid > *,
  .services-grid > *,
  .projects-grid > * {
    scroll-snap-align: start;
  }

  .services-grid .wide {
    grid-column: auto;
  }

  .project-thumb {
    min-height: 0;
  }
}

@keyframes modal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modal-rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 680px) {
  .quick-info,
  .values-grid,
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .micro-cta,
  .footer-inner {
    grid-template-columns: 1fr auto;
  }

  .footer-inner {
    align-items: start;
  }

  .footer-inner > p {
    grid-column: 1 / -1;
  }

  .footer-links {
    align-self: end;
    justify-self: end;
  }
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .hero-grid,
  .split,
  .about-layout,
  .contact-grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }

  .about-layout {
    grid-template-columns: 0.92fr 1.08fr;
    align-items: center;
  }

  .about-title {
    font-size: min(3.15rem, 4.2vw);
  }


  h1 {
    max-width: 650px;
    font-size: min(3.35rem, 4.4vw);
    font-weight: 700;
    line-height: 1.12;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }


  .service-card.wide {
    grid-column: span 3;
  }

  .modal-panel {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    align-items: start;
  }

  .modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    left: auto;
  }

  .modal-gallery {
    position: sticky;
    top: 28px;
    align-self: start;
    gap: 10px;
    padding: 68px 0 32px 28px;
  }


  .gallery-hint {
    display: block;
  }

  .modal-content {
    padding: 68px 34px 34px;
  }
}

/* Contact form: hidden honeypot field for bots, and send errors. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.success-message.is-error {
  color: var(--danger);
}
