/* ============================================
   JT Homewares — Global Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-bg-dark: #1a1a1a;
  --color-bg-darker: #111111;
  --color-bg-card: #222222;
  --color-gold: #c9a96e;
  --color-gold-light: #dfc08a;
  --color-gold-dark: #a8884d;
  --color-cream: #f5f0eb;
  --color-cream-dark: #e0d6cb;
  --color-text: #f5f0eb;
  --color-text-muted: #999999;
  --color-text-dark: #1a1a1a;
  --color-border: rgba(201, 169, 110, 0.2);
  --color-border-light: rgba(245, 240, 235, 0.1);
  --color-overlay: rgba(26, 26, 26, 0.7);

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-height: 80px;
  --section-padding: clamp(80px, 10vw, 140px);
  --container-width: 1280px;
  --container-padding: clamp(20px, 4vw, 60px);

  --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-elastic: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-dark);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

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

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
  cursor: none;
}

a:hover {
  color: var(--color-gold-light);
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
  cursor: none;
}

::selection {
  background: var(--color-gold);
  color: var(--color-bg-dark);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-cream);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

h4 {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
}

p {
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  color: var(--color-text-muted);
  max-width: 65ch;
}

.text-gold {
  color: var(--color-gold);
}

.text-cream {
  color: var(--color-cream);
}

.label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container--wide {
  max-width: 1440px;
}

.container--narrow {
  max-width: 900px;
}

section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section--cream {
  background-color: var(--color-cream);
  color: var(--color-text-dark);
}

.section--cream h1,
.section--cream h2,
.section--cream h3,
.section--cream h4 {
  color: var(--color-text-dark);
}

.section--cream p {
  color: #555;
}

.section--cream .label {
  color: var(--color-gold-dark);
}

.section--darker {
  background-color: var(--color-bg-darker);
}

/* --- Custom Cursor --- */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--color-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--color-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.3s ease,
              background 0.3s ease;
}

.cursor-dot.hovering {
  width: 4px;
  height: 4px;
  background: var(--color-cream);
}

.cursor-ring.hovering {
  width: 60px;
  height: 60px;
  border-color: var(--color-gold-light);
  background: rgba(201, 169, 110, 0.08);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background 0.4s ease,
              backdrop-filter 0.4s ease;
}

.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
  z-index: -1;
}

.nav.scrolled::before {
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav.hidden {
  transform: translateY(-100%);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  z-index: 1001;
}

.nav__logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-cream);
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
}

.nav__logo-text span {
  color: var(--color-gold);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}

.nav__link {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-cream);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width var(--transition-smooth);
}

.nav__link:hover {
  color: var(--color-gold);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__link.active {
  color: var(--color-gold);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  z-index: 1001;
  cursor: none;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-cream);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.3s ease;
}

.nav__hamburger span:nth-child(1) {
  transform: translateY(-4px);
}

.nav__hamburger span:nth-child(3) {
  transform: translateY(4px);
}

.nav__hamburger.open span:nth-child(1) {
  transform: translateY(1.5px) rotate(45deg);
}

.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-1.5px) rotate(-45deg);
}

/* Mobile Menu */
.nav__mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-bg-darker);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.nav__mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.nav__mobile-link {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: var(--color-cream);
  text-decoration: none;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.nav__mobile-menu.open .nav__mobile-link {
  opacity: 1;
  transform: translateY(0);
}

.nav__mobile-link:hover {
  color: var(--color-gold);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 40px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  transition: color var(--transition-fast);
  cursor: none;
}

.btn--primary {
  background: var(--color-gold);
  color: var(--color-bg-dark);
}

.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-cream);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn--primary:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn--primary:hover {
  color: var(--color-bg-dark);
}

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

.btn svg {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn--outline {
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  background: transparent;
}

.btn--outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn--outline:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn--outline:hover {
  color: var(--color-bg-dark);
}

.btn--small {
  padding: 12px 28px;
  font-size: 0.8rem;
}

/* Magnetic button wrapper */
.magnetic-wrap {
  display: inline-block;
  position: relative;
}

/* --- Divider --- */
.divider {
  width: 60px;
  height: 1px;
  background: var(--color-gold);
  margin: 20px 0;
}

.divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* --- Section Header --- */
.section-header {
  margin-bottom: clamp(40px, 6vw, 80px);
}

.section-header--center {
  text-align: center;
}

.section-header--center p {
  margin-left: auto;
  margin-right: auto;
}

.section-header .label {
  margin-bottom: 16px;
  display: block;
}

.section-header h2 {
  margin-bottom: 20px;
}

.section-header p {
  margin-top: 16px;
}

/* --- Cards --- */
.card {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-card);
  transition: transform var(--transition-smooth);
}

.card__image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.card__content {
  padding: 24px;
}

.card__content h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.card__content p {
  font-size: 0.9rem;
}

/* --- Footer --- */
.footer {
  background: var(--color-bg-darker);
  border-top: 1px solid var(--color-border-light);
  padding: 80px 0 30px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer__brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  max-width: 320px;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 24px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__links a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--color-gold);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer__contact-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
  stroke: var(--color-gold);
}

.footer__bottom {
  border-top: 1px solid var(--color-border-light);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__copyright {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.footer__legal {
  display: flex;
  gap: 24px;
}

.footer__legal a {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.footer__legal a:hover {
  color: var(--color-gold);
}

/* --- Page Hero (for inner pages) --- */
.page-hero {
  padding: calc(var(--nav-height) + 60px) 0 60px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: -10%;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(201, 169, 110, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero .label {
  margin-bottom: 16px;
}

.page-hero h1 {
  margin-bottom: 20px;
}

.page-hero p {
  max-width: 600px;
}

/* --- Form Styles --- */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-cream);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  color: var(--color-cream);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-gold);
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group select option {
  background: var(--color-bg-dark);
}

.form-error {
  font-size: 0.8rem;
  color: #e74c3c;
  margin-top: 6px;
  display: none;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: #e74c3c;
}

.form-group.error .form-error {
  display: block;
}

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

.overflow-hidden {
  overflow: hidden;
}

/* Touch devices: show default cursor */
@media (hover: none) and (pointer: coarse) {
  body,
  a,
  button,
  input,
  textarea,
  select,
  .btn {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}
