/* Joyaesmalte — Mediterranean Jewelry Atelier */

:root {
  --ivory: #f7f3ec;
  --pearl: #fbf9f5;
  --sand: #e8dfd2;
  --limestone: #d9cfc0;
  --beige: #cbbba6;
  --stone: #b5a794;
  --taupe: #8f8172;
  --terracotta: #a65d45;
  --sienna: #8a4a35;
  --olive: #6e6b4f;
  --espresso: #2c241b;
  --brass: #8b6b4a;
  --ink: #3a322a;
  --muted: #6b5f52;
  --line: rgba(44, 36, 27, 0.12);
  --header-h: 4.5rem;
  --font-serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-sans: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-soft: 0 18px 50px rgba(44, 36, 27, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 60% at 10% -10%, rgba(166, 93, 69, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(110, 107, 79, 0.07), transparent 50%),
    linear-gradient(180deg, var(--pearl) 0%, var(--ivory) 40%, var(--sand) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  padding-top: var(--header-h);
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

a:hover {
  color: var(--terracotta);
}

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

h1, h2, h3, h4,
p, li, label, button, input, textarea, a, span, .nav-link, .btn, .modal {
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.container-wide {
  width: min(1280px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.section {
  padding: clamp(3.5rem, 8vw, 7rem) 0;
}

.section-tight {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0 0 1rem;
  font-weight: 500;
}

.section-num {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1;
  color: var(--limestone);
  margin: 0 0 0.75rem;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--espresso);
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 38rem;
}

.prose {
  max-width: 40rem;
  color: var(--ink);
}

.prose p + p {
  margin-top: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(251, 249, 245, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(251, 249, 245, 0.96);
  box-shadow: 0 8px 30px rgba(44, 36, 27, 0.06);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img,
.logo svg {
  height: 2.35rem;
  width: auto;
  max-width: min(200px, 52vw);
}

.logo-mark {
  height: 2.35rem;
  width: auto;
  max-width: min(200px, 52vw);
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--espresso);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.6rem);
}

.nav-desktop a {
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding: 0.25rem 0;
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-desktop a:hover::after,
.nav-desktop a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-cta {
  display: none;
}

.menu-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--pearl);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  background: var(--espresso);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-mobile {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(247, 243, 236, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem 1.25rem 3rem;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.4s var(--ease), visibility 0.4s;
  z-index: 999;
  overflow-y: auto;
}

.nav-mobile.is-open {
  transform: translateX(0);
  visibility: visible;
}

.nav-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.nav-mobile a {
  display: block;
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  padding: 0.55rem 0;
  color: var(--espresso);
  border-bottom: 1px solid var(--line);
}

.nav-mobile .btn {
  margin-top: 1.75rem;
  width: 100%;
  text-align: center;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn-primary {
  background: var(--espresso);
  color: var(--pearl);
  border-color: var(--espresso);
}

.btn-primary:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--pearl);
}

.btn-primary:active {
  transform: scale(0.98);
  background: var(--sienna);
}

.btn-primary.is-success {
  background: var(--olive);
  border-color: var(--olive);
}

.btn-ghost {
  background: transparent;
  color: var(--espresso);
  border-color: var(--beige);
}

.btn-ghost:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  animation: heroReveal 1.6s var(--ease) both;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(44, 36, 27, 0.18) 0%, rgba(44, 36, 27, 0.45) 55%, rgba(44, 36, 27, 0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(2.5rem, 8vw, 5rem) 0;
  color: var(--pearl);
  max-width: 42rem;
}

.hero-content .eyebrow {
  color: rgba(251, 249, 245, 0.75);
}

.hero-content h1 {
  color: var(--pearl);
}

.hero-content .lead {
  color: rgba(251, 249, 245, 0.85);
}

.hero .btn-primary {
  background: var(--pearl);
  color: var(--espresso);
  border-color: var(--pearl);
}

.hero .btn-primary:hover {
  background: var(--sand);
  border-color: var(--sand);
}

.hero .btn-ghost {
  color: var(--pearl);
  border-color: rgba(251, 249, 245, 0.45);
}

.hero .btn-ghost:hover {
  border-color: var(--pearl);
  color: var(--pearl);
}

/* Editorial split */
.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.split-media {
  overflow: hidden;
  background: var(--sand);
  min-height: 280px;
}

.split-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.split:hover .split-media img {
  transform: scale(1.03);
}

/* Collection grid */
.grid-collections {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.collection-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  background: var(--sand);
  text-decoration: none;
  color: var(--pearl);
  display: block;
}

.collection-card img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.collection-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(44, 36, 27, 0.7) 100%);
}

.collection-card:hover img {
  transform: scale(1.05);
}

.collection-card span {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 1.6rem;
}

/* Material / process grids */
.grid-materials,
.grid-steps,
.grid-features {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.material-item,
.feature-card,
.step-item {
  background: rgba(251, 249, 245, 0.7);
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.material-item img,
.feature-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 1rem;
}

.step-item {
  position: relative;
  padding-top: 2rem;
}

.step-item .step-index {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--terracotta);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.process-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: 2rem 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--taupe);
}

.process-flow span {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.process-flow span:not(:last-child)::after {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--beige);
}

.media-duo {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.media-duo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cta-band {
  background: var(--espresso);
  color: var(--pearl);
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(166, 93, 69, 0.25), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(139, 107, 74, 0.18), transparent 35%);
  pointer-events: none;
}

.cta-band .container {
  position: relative;
  z-index: 1;
}

.cta-band h2 {
  color: var(--pearl);
  max-width: 18ch;
}

.cta-band .lead {
  color: rgba(251, 249, 245, 0.75);
}

.cta-band .btn-primary {
  background: var(--pearl);
  color: var(--espresso);
  border-color: var(--pearl);
}

.cta-band .btn-primary:hover {
  background: var(--sand);
}

.cta-band .btn-ghost {
  color: var(--pearl);
  border-color: rgba(251, 249, 245, 0.4);
}

.cta-band .btn-ghost:hover {
  border-color: var(--pearl);
  color: var(--pearl);
}

.page-hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.page-hero .lead {
  margin-bottom: 0;
}

.legal-content h2 {
  margin-top: 2.5rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.legal-content ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.legal-content li + li {
  margin-top: 0.4rem;
}

/* Contact */
.contact-layout {
  display: grid;
  gap: 2.5rem;
}

.contact-details {
  display: grid;
  gap: 1.25rem;
}

.contact-block {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.contact-block dt {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 0.35rem;
}

.contact-block dd {
  margin: 0;
  font-size: 1.05rem;
  color: var(--espresso);
}

.contact-photo {
  margin-top: 1.5rem;
}

.contact-form {
  background: rgba(251, 249, 245, 0.85);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-soft);
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--taupe);
}

.form-field input,
.form-field textarea {
  width: 100%;
  appearance: none;
  border: 1px solid var(--beige);
  background: var(--pearl);
  color: var(--espresso);
  font: inherit;
  padding: 0.9rem 1rem;
  border-radius: 0;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.form-field textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-field input:hover,
.form-field textarea:hover {
  border-color: var(--stone);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(166, 93, 69, 0.15);
}

.form-field.is-invalid input,
.form-field.is-invalid textarea {
  border-color: var(--sienna);
}

.field-error {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--sienna);
}

.form-field.is-invalid .field-error {
  display: block;
}

.form-note {
  font-size: 0.85rem;
  color: var(--taupe);
  margin: 0 0 1rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(44, 36, 27, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: min(440px, 100%);
  background: var(--pearl);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  max-height: min(90vh, 560px);
  overflow-y: auto;
  transform: translateY(12px);
  transition: transform 0.35s var(--ease);
}

.modal-overlay.is-open .modal {
  transform: translateY(0);
}

.modal h2 {
  font-size: 1.8rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  background: var(--ivory);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--espresso);
}

/* Footer */
.site-footer {
  background: var(--espresso);
  color: rgba(251, 249, 245, 0.82);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--pearl);
  margin: 0 0 0.75rem;
}

.footer-meta p {
  margin: 0 0 0.35rem;
}

.footer-nav,
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-nav a,
.footer-social a {
  color: rgba(251, 249, 245, 0.82);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover,
.footer-social a:hover {
  color: var(--pearl);
}

.footer-social {
  margin-top: 0.5rem;
}

.footer-social-wrap {
  margin-top: 1.25rem;
}

.footer-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(251, 249, 245, 0.5);
  margin: 0 0 0.75rem;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(251, 249, 245, 0.12);
  font-size: 0.85rem;
  color: rgba(251, 249, 245, 0.55);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 3000;
  background: var(--espresso);
  color: var(--pearl);
  padding: 0.75rem 1rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Responsive */
@media (min-width: 640px) {
  .grid-collections {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

@media (min-width: 900px) {
  .nav-desktop,
  .header-cta {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .split {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .split.reverse {
    grid-template-columns: 0.95fr 1.05fr;
  }

  .split.reverse .split-copy {
    order: -1;
  }

  .grid-collections {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

  .contact-layout {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .grid-features {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 359px) {
  .container,
  .container-wide {
    width: calc(100% - 1.5rem);
  }

  .btn {
    width: 100%;
  }

  .btn-group {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-media img,
  .split-media img,
  .collection-card img {
    transform: none !important;
  }
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}
