/* =========================================================
   SABLE STUDIO — style.css
   ========================================================= */

/* ---------------------------------------------------------
   @font-face — Cormorant Garamond
   --------------------------------------------------------- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('Cormorant Garamond Light'),
       url('assets/fonts/cormorant-garamond-v21-latin/cormorant-garamond-v21-latin-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Cormorant Garamond'),
       url('assets/fonts/cormorant-garamond-v21-latin/cormorant-garamond-v21-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('Cormorant Garamond Medium'),
       url('assets/fonts/cormorant-garamond-v21-latin/cormorant-garamond-v21-latin-500.woff2') format('woff2');
}

/* ---------------------------------------------------------
   @font-face — DM Sans
   --------------------------------------------------------- */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('DM Sans Light'),
       url('assets/fonts/dm-sans-v17-latin/dm-sans-v17-latin-300.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('DM Sans'),
       url('assets/fonts/dm-sans-v17-latin/dm-sans-v17-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('DM Sans Medium'),
       url('assets/fonts/dm-sans-v17-latin/dm-sans-v17-latin-500.woff2') format('woff2');
}

/* ---------------------------------------------------------
   Custom Properties
   --------------------------------------------------------- */
:root {
  --bg:          #F5F2EE;
  --text:        #1A1A1A;
  --text-muted:  #7A7370;
  --accent:      #C07A50;
  --accent-dark: #A8653E;
  --border:      #E0DAD4;
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'DM Sans', system-ui, sans-serif;
  --max-w:       1200px;
  --section-gap: clamp(5rem, 10vw, 9rem);
  --nav-h:       68px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------------------------------------------------------
   Utilities
   --------------------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---------------------------------------------------------
   Navigation
   --------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(245, 242, 238, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  color: var(--text);
  transition: color 0.2s;
}

.nav__brand:hover {
  color: var(--accent);
}

.nav__menu {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav__link {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav__link:hover,
.nav__link.active {
  color: var(--accent);
}

/* Hamburger toggle — hidden by default */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Hamburger → × when nav is open */
body.nav-open .nav__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav__toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.footer {
  padding-block: 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer__credits {
  margin-top: 0.5rem;
  font-size: 0.82rem;
}

.footer__credits a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* ---------------------------------------------------------
   Hero Section
   --------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding-inline: 1.5rem;
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.1;
}

.hero__subtitle {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 1rem;
  letter-spacing: 0.06em;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

/* Base button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}

/* Outline white (used on hero dark bg) */
.btn--outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.8);
}

.btn--outline-white:hover {
  background: #fff;
  color: var(--text);
  border-color: #fff;
}

/* Accent fill */
.btn--accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* Chevron scroll indicator */
.hero__chevron {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s ease-in-out infinite;
}

.hero__chevron:hover {
  color: rgba(255, 255, 255, 0.9);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ---------------------------------------------------------
   Intro Section (index.html)
   --------------------------------------------------------- */
.intro {
  padding-block: var(--section-gap);
}

.intro__inner {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}

.intro__body {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.75;
  color: var(--text);
}

.intro__links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.intro__link {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  transition: text-decoration 0.2s;
}

.intro__link:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------
   Page Header (work / about / contact)
   --------------------------------------------------------- */
.page-header {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 2rem;
}

.page-header .container {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.page-header__title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text);
  line-height: 1.2;
}

.page-header__desc {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ---------------------------------------------------------
   Gallery (work.html)
   --------------------------------------------------------- */
.gallery-section {
  padding-top: 3rem;
  padding-bottom: var(--section-gap);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--border);
}

/* 4:5 aspect ratio via padding trick */
.gallery__item::before {
  content: '';
  display: block;
  padding-top: 125%;
}

.gallery__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  z-index: 1;
}

.gallery__item:hover img {
  transform: scale(1.04);
}

.gallery__item:hover::after {
  background: rgba(0, 0, 0, 0.18);
}

/* ---------------------------------------------------------
   Lightbox
   --------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  transition: opacity 0.25s ease;
  position: relative;
  z-index: 1;
}

.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s;
  z-index: 2;
}

.lightbox__close:hover {
  color: #fff;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 1rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__arrow:hover {
  color: #fff;
}

.lightbox__arrow:disabled {
  opacity: 0.2;
  cursor: default;
}

.lightbox__arrow--prev {
  left: 1rem;
}

.lightbox__arrow--next {
  right: 1rem;
}

.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  z-index: 2;
}

/* ---------------------------------------------------------
   About Page
   --------------------------------------------------------- */
.about-section {
  padding-top: 3rem;
  padding-bottom: var(--section-gap);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about-grid__img img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
}

.about-grid__text h1 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--text);
  margin-bottom: 2rem;
}

.about-grid__text p {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.about-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 2.5rem;
}

.about-grid__text .section-label {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: block;
}

.services-list {
  list-style: none;
}

.services-list li {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 2;
}

.expect-text {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.about-cta {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  transition: text-decoration 0.2s;
}

.about-cta:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------
   Contact Page
   --------------------------------------------------------- */
.contact-section {
  padding-top: 3rem;
  padding-bottom: var(--section-gap);
}

.contact-form {
  max-width: 580px;
  margin-inline: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
}

.form-group label {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: transparent;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

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

.form-group textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

/* Custom select arrow */
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A7370' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Error state */
.form-group--error input,
.form-group--error select,
.form-group--error textarea {
  border-color: #c0392b;
}

.form-group__error-msg {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: #c0392b;
  display: none;
}

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

/* Submit button */
.btn--submit {
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn--submit:hover:not(:disabled) {
  background: var(--accent-dark);
}

.btn--submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Form feedback message */
.form-message {
  display: none;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-message.is-visible {
  display: block;
}

.form-message--error {
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.3);
  color: #a93226;
}

.form-message--success {
  background: rgba(39, 174, 96, 0.08);
  border: 1px solid rgba(39, 174, 96, 0.3);
  color: #1e8449;
}

/* Form success state */
#form-success {
  text-align: center;
  padding-block: 2rem;
}

#form-success h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 2rem;
  color: var(--text);
}

#form-success p {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

/* Tablet */
@media (max-width: 768px) {
  /* Mobile nav */
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 99;
  }

  body.nav-open .nav__menu {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 1rem;
    letter-spacing: 0.15em;
  }

  /* Gallery 2-col */
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  /* About single column */
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 480px) {
  /* Gallery 1-col */
  .gallery {
    grid-template-columns: 1fr;
  }

  .hero__ctas {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 260px;
  }
}
