@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600;700&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
  --color-bg: #0A0A0B;
  --color-text: #E2E8F0;
  --color-secondary: #171717;
  --color-meta: #404040;
  --color-highlight: #FFFFFF;
  
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Montserrat', sans-serif;
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  
  --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-luxury: 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 0.9rem;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

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

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

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

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform var(--transition-smooth);
  border-bottom: 1px solid rgba(226, 232, 240, 0.1);
}

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

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-highlight);
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.nav a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  padding: var(--space-xs) 0;
}

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

.nav a:hover::after {
  width: 100%;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 0.3rem;
  cursor: pointer;
  z-index: 1001;
}

.burger span {
  width: 1.5rem;
  height: 2px;
  background: var(--color-text);
  transition: all var(--transition-fast);
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(0.4rem, 0.4rem);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(0.4rem, -0.4rem);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 4rem;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding: var(--space-md);
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  transform: translateY(2rem);
  animation: fadeInUp 1s var(--transition-luxury) forwards;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
  transform: translateY(2rem);
  animation: fadeInUp 1s var(--transition-luxury) 0.3s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--color-highlight);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.3);
  transform: translate(-50%, -50%);
  transition: width var(--transition-luxury), height var(--transition-luxury);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.section-title {
  text-align: center;
  margin-bottom: var(--space-lg);
  font-size: 2.5rem;
}

.asymmetric-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.grid-item {
  background: var(--color-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.grid-item:hover::before {
  opacity: 1;
}

.grid-item:hover {
  transform: translateY(-0.5rem);
  box-shadow: var(--shadow-lg);
}

.grid-item-1 { grid-column: 1 / 7; grid-row: 1; }
.grid-item-2 { grid-column: 7 / 13; grid-row: 1; }
.grid-item-3 { grid-column: 1 / 5; grid-row: 2; }
.grid-item-4 { grid-column: 5 / 10; grid-row: 2; }
.grid-item-5 { grid-column: 10 / 13; grid-row: 2; }

.product-card {
  background: var(--color-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-smooth);
  position: relative;
}

.product-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.product-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform var(--transition-luxury);
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

.product-info {
  padding: var(--space-md);
}

.product-title {
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
}

.product-price {
  font-size: 1.5rem;
  font-family: var(--font-display);
  color: var(--color-highlight);
  margin-top: var(--space-sm);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  background: var(--color-secondary);
  border: 1px solid rgba(226, 232, 240, 0.1);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-highlight);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

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

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
}

.checkbox-group label {
  font-size: 0.8rem;
  text-transform: none;
}

.footer {
  background: var(--color-secondary);
  padding: var(--space-md) 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-meta);
  border-top: 1px solid rgba(226, 232, 240, 0.1);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--color-meta);
}

.footer-links a:hover {
  color: var(--color-text);
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.contact-info {
  background: var(--color-secondary);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
}

.contact-item {
  margin-bottom: var(--space-md);
}

.contact-item i {
  margin-right: var(--space-xs);
  color: var(--color-highlight);
}

.map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: var(--space-md);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.popup.active {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: var(--color-secondary);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  position: relative;
  transform: scale(0.9);
  transition: transform var(--transition-smooth);
}

.popup.active .popup-content {
  transform: scale(1);
}

.popup-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.popup-close:hover {
  color: var(--color-highlight);
}

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md);
}

.error-content h1 {
  font-size: 8rem;
  margin-bottom: var(--space-sm);
}

.thank-you-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md);
}

.icon-feature {
  text-align: center;
  padding: var(--space-md);
}

.icon-feature i {
  font-size: 2.5rem;
  color: var(--color-highlight);
  margin-bottom: var(--space-sm);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}

.parallax-section {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background-size: cover;
  background-position: center;
  transform: translateZ(0);
}

.overlay-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-md);
}

.fade-in {
  opacity: 0;
  transform: translateY(2rem);
  transition: all var(--transition-luxury);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-3rem);
  transition: all var(--transition-luxury);
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(3rem);
  transition: all var(--transition-luxury);
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    transition: right var(--transition-smooth);
    box-shadow: var(--shadow-lg);
  }
  
  .nav.active {
    right: 0;
  }
  
  .burger {
    display: flex;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.5rem; }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .section {
    padding: var(--space-lg) 0;
  }
  
  .asymmetric-grid {
    grid-template-columns: 1fr;
  }
  
  .grid-item-1,
  .grid-item-2,
  .grid-item-3,
  .grid-item-4,
  .grid-item-5 {
    grid-column: 1;
    grid-row: auto;
  }
  
  .contact-section {
    grid-template-columns: 1fr;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 0.95rem;
  }
  
  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.8rem;
  }
}

/* 320px: best support for very small devices (e.g. iPhone SE, narrow portrait) */
@media (max-width: 320px) {
  :root {
    --space-xs: 0.35rem;
    --space-sm: 0.65rem;
    --space-md: 1.25rem;
    --space-lg: 2.5rem;
    --space-xl: 3rem;
  }

  html {
    font-size: 14px; /* stable base for rem */
  }

  body {
    font-size: 0.85rem;
    min-width: 0;
    overflow-x: hidden;
  }

  .container {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  /* Header & nav */
  .header-inner {
    padding: 0.6rem var(--space-sm);
  }

  .logo {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav {
    width: 85%;
    padding: var(--space-md);
  }

  .nav a {
    font-size: 0.8rem;
  }

  .burger span {
    width: 1.25rem;
  }

  /* Hero */
  .hero {
    padding-top: 3rem;
  }

  .hero-content {
    padding: var(--space-sm);
  }

  .hero h1 {
    font-size: 1.5rem;
    line-height: 1.25;
    margin-bottom: var(--space-sm);
  }

  .hero p {
    font-size: 0.8rem;
    margin-bottom: var(--space-md);
  }

  /* Typography */
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.35rem; }
  h3 { font-size: 1.15rem; }
  h4 { font-size: 1rem; }
  h5 { font-size: 0.95rem; }
  h6 { font-size: 0.85rem; }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
  }

  .section {
    padding: var(--space-lg) 0;
  }

  /* Buttons */
  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.7rem;
    min-height: 2.5rem; /* touch-friendly */
  }

  /* Grid & cards */
  .asymmetric-grid {
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
  }

  .grid-item,
  .contact-info {
    padding: var(--space-sm);
    min-width: 0; /* prevent overflow in grid */
  }

  .grid-item img,
  .product-image {
    height: 220px;
    margin-bottom: var(--space-sm);
  }

  .product-info {
    padding: var(--space-sm);
  }

  .product-title {
    font-size: 1rem;
  }

  .product-price {
    font-size: 1.1rem;
  }

  .products-grid {
    gap: var(--space-sm);
  }

  /* Forms */
  .form-group input,
  .form-group textarea {
    padding: 0.65rem;
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  .form-group textarea {
    min-height: 100px;
  }

  .checkbox-group label {
    font-size: 0.75rem;
  }

  /* Features & icons */
  .icon-feature {
    padding: var(--space-sm);
  }

  .icon-feature i {
    font-size: 1.75rem;
  }

  .features-grid {
    gap: var(--space-sm);
    grid-template-columns: 1fr;
  }

  /* Parallax / overlay */
  .parallax-section {
    min-height: 50vh;
  }

  .overlay-content {
    padding: var(--space-sm);
  }

  .overlay-content h2 {
    font-size: 1.5rem;
  }

  .overlay-content p {
    font-size: 0.85rem;
  }

  /* Map */
  .map-container {
    height: 260px;
    margin-top: var(--space-sm);
  }

  /* Footer */
  .footer {
    padding: var(--space-sm) 0;
    font-size: 0.65rem;
  }

  .footer-content {
    padding: 0 var(--space-sm);
    gap: var(--space-xs);
  }

  .footer-links {
    gap: var(--space-sm);
  }

  .footer-links a {
    font-size: 0.65rem;
  }

  /* Popup */
  .popup-content {
    width: 94%;
    max-width: none;
    padding: var(--space-md);
    margin: var(--space-sm);
  }

  .popup-close {
    top: var(--space-xs);
    right: var(--space-xs);
    font-size: 1.25rem;
  }

  /* Error / thank-you pages */
  .error-content h1 {
    font-size: 4rem;
  }

  .thank-you-page .section-title,
  .error-page h1 {
    font-size: 1.5rem;
  }

  /* CTA / inline sections (signature.html, etc.) */
  .section [style*="padding-top: 8rem"] {
    padding-top: 5rem !important;
  }

  .section [style*="max-width: 800px"],
  .section [style*="max-width: 700px"],
  .section [style*="max-width: 600px"] {
    font-size: 0.85rem;
  }

  /* ---------- Signature page (320px) ---------- */
  .page-signature .section:first-of-type {
    padding-top: 4.5rem !important;
  }

  .page-signature .section-title:first-of-type {
    font-size: 1.35rem;
    margin-bottom: var(--space-sm);
  }

  .page-signature .section:first-of-type p.fade-in {
    font-size: 0.8rem !important;
    margin-bottom: var(--space-md) !important;
    line-height: 1.5;
  }

  /* Signature pieces (Eternal Radiance, Midnight Symphony) */
  .page-signature .section:nth-of-type(2) .grid-item {
    transform: none;
    margin-top: 0 !important;
  }

  .page-signature .section:nth-of-type(2) .grid-item img {
    height: 200px;
    margin-bottom: var(--space-xs);
  }

  .page-signature .section:nth-of-type(2) .grid-item h3 {
    font-size: 1.05rem;
    margin-bottom: var(--space-xs);
  }

  .page-signature .section:nth-of-type(2) .grid-item p {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .page-signature .section:nth-of-type(2) .grid-item p[style*="color: var(--color-highlight)"] {
    font-size: 1rem !important;
    margin-top: var(--space-xs) !important;
  }

  /* Parallax "Master Artisans" */
  .page-signature .parallax-section .overlay-content h2 {
    font-size: 1.35rem;
    margin-bottom: var(--space-sm);
  }

  .page-signature .parallax-section .overlay-content p {
    font-size: 0.8rem !important;
    max-width: 100%;
  }

  /* Signature Line Benefits (4 cards) */
  .page-signature .section:nth-of-type(4) .grid-item i.fas {
    font-size: 1.75rem !important;
    margin-bottom: var(--space-xs) !important;
  }

  .page-signature .section:nth-of-type(4) .grid-item h3 {
    font-size: 1rem;
  }

  .page-signature .section:nth-of-type(4) .grid-item p {
    font-size: 0.8rem;
  }

  /* Design Philosophy (2-column grid) */
  .page-signature .section:nth-of-type(5) .grid-item {
    grid-column: 1 !important;
  }

  .page-signature .section:nth-of-type(5) .grid-item h3 {
    font-size: 1.05rem;
  }

  .page-signature .section:nth-of-type(5) .grid-item p {
    font-size: 0.8rem;
  }

  /* Creation Process intro + 4 steps */
  .page-signature .section:nth-of-type(6) .section-title {
    font-size: 1.35rem;
  }

  .page-signature .section:nth-of-type(6) p.fade-in {
    font-size: 0.8rem !important;
    margin-bottom: var(--space-md) !important;
  }

  .page-signature .section:nth-of-type(6) .icon-feature h4 {
    font-size: 0.9rem;
  }

  .page-signature .section:nth-of-type(6) .icon-feature p {
    font-size: 0.8rem;
  }

  /* CTA "Begin Your Signature Journey" */
  .page-signature .section:nth-of-type(7) > .container > div {
    padding: var(--space-md) var(--space-sm) !important;
  }

  .page-signature .section:nth-of-type(7) h2 {
    font-size: 1.2rem;
    margin-bottom: var(--space-sm) !important;
  }

  .page-signature .section:nth-of-type(7) p {
    font-size: 0.8rem !important;
    margin-bottom: var(--space-sm) !important;
  }
}
