/* ============================================================
   LETTERING IN THE CLOUD — Design System
   A luxury calligraphy & hand-engraving atelier
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

/* --- Custom Properties --- */
:root {
  /* Palette */
  --bg: #F5F2EE;
  --surface: #FDFBF8;
  --ink: #1A1815;
  --muted: #7A7570;
  --gold: #B8A07A;
  --placeholder: #E8E4DF;

  /* Typography — Display */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-width: 1200px;
  --section-spacing: 120px;
  --nav-height: 72px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 300ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

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


/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.t-display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.t-display-sm {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.t-section {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.t-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.t-caption {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.t-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.0;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
}


/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding-top: var(--section-spacing);
  padding-bottom: var(--section-spacing);
}

.section + .section {
  padding-top: 0;
}


/* ============================================================
   GOLD HAIRLINE
   ============================================================ */

.gold-line {
  display: block;
  width: 48px;
  height: 1px;
  background-color: var(--gold);
  border: none;
}

.gold-line--full {
  width: 100%;
}

.gold-line--center {
  margin-left: auto;
  margin-right: auto;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  padding: 14px 40px;
  border: 1px solid var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  transition: color var(--duration) var(--ease),
              background-color var(--duration) var(--ease);
  cursor: pointer;
}

.btn:hover {
  background-color: var(--ink);
  color: var(--bg);
}

.btn--gold {
  border-color: var(--gold);
  color: var(--gold);
}

.btn--gold:hover {
  background-color: var(--gold);
  color: var(--surface);
}


/* ============================================================
   IMAGE PLACEHOLDERS
   ============================================================ */

.img-placeholder {
  width: 100%;
  background-color: var(--placeholder);
  position: relative;
  overflow: hidden;
}

.img-placeholder::after {
  content: attr(data-label);
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  opacity: 0.6;
}

.img-placeholder--3x4 {
  aspect-ratio: 3 / 4;
}

.img-placeholder--4x3 {
  aspect-ratio: 4 / 3;
}

.img-placeholder--4x5 {
  aspect-ratio: 4 / 5;
}

.img-placeholder--16x9 {
  aspect-ratio: 16 / 9;
}

.img-placeholder--1x1 {
  aspect-ratio: 1 / 1;
}

/* Real images inside placeholders */
.img-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero real image */
.hero__img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
}

/* Gallery / work-grid real images */
.gallery-img {
  display: block;
  width: 100%;
  object-fit: cover;
}
.gallery-img--3x4 { aspect-ratio: 3 / 4; }
.gallery-img--4x3 { aspect-ratio: 4 / 3; }
.gallery-img--4x5 { aspect-ratio: 4 / 5; }
.gallery-img--1x1 { aspect-ratio: 1 / 1; }

/* About portrait real image */
.about-portrait-img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
}

/* Service block real image */
.service-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background-color: transparent;
  transition: background-color var(--duration) var(--ease);
}

.nav--scrolled {
  background-color: rgba(245, 242, 238, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

/* Language toggle — left */
.nav__lang {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 140px;
}

.nav__lang-item {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--duration) var(--ease);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.nav__lang-item--active {
  color: var(--ink);
}

.nav__lang-item--disabled {
  opacity: 0.4;
  cursor: default;
}

/* Logo — center */
.nav__logo {
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.nav__logo-line {
  display: block;
  width: 48px;
  height: 1px;
  background-color: var(--gold);
  margin: 6px auto 0;
}

/* Navigation links — right */
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 140px;
  justify-content: flex-end;
}

.nav__link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--duration) var(--ease);
  position: relative;
}

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

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

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

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  gap: 6px;
}

.nav__hamburger span {
  display: block;
  width: 20px;
  height: 1px;
  background-color: var(--ink);
  transition: transform var(--duration) var(--ease),
              opacity var(--duration) var(--ease);
}

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

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

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

/* Mobile menu overlay */
.nav__mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--bg);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.nav__mobile-menu--open {
  display: flex;
  opacity: 1;
}

.nav__mobile-menu .nav__link {
  font-size: 13px;
  letter-spacing: 0.12em;
}

.nav__mobile-menu .nav__lang {
  margin-top: 40px;
}


/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  padding-top: 80px;
  padding-bottom: 60px;
  text-align: center;
}

.footer__cta {
  margin-top: 48px;
  margin-bottom: 48px;
}

.footer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.footer__link {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color var(--duration) var(--ease);
}

.footer__link:hover {
  color: var(--ink);
}

.footer__sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--placeholder);
  display: inline-block;
}

.footer__copyright {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--muted);
}


/* ============================================================
   HOME — HERO
   ============================================================ */

.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: var(--section-spacing);
}

.hero__grid {
  display: grid;
  grid-template-columns: 45fr 55fr;
  gap: 60px;
  align-items: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.hero__headline {
  max-width: 440px;
}

.hero__subtext {
  max-width: 340px;
  color: var(--muted);
}

.hero__cta {
  margin-top: 8px;
}


/* ============================================================
   HOME — DISCIPLINE LINE
   ============================================================ */

.discipline {
  padding-top: 0;
  padding-bottom: var(--section-spacing);
  text-align: center;
}

.discipline__text {
  padding: 40px 0;
  word-spacing: 0.1em;
}


/* ============================================================
   HOME — SELECTED WORK PREVIEW
   ============================================================ */

.work-preview {
  padding-bottom: var(--section-spacing);
}

.work-preview__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.work-preview__item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.work-preview__item:nth-child(2) {
  margin-top: 48px;
}

.work-preview__item:nth-child(3) {
  margin-top: 24px;
}

.work-preview__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 24, 21, 0);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  transition: background var(--duration) var(--ease);
}

.work-preview__item:hover .work-preview__overlay {
  background: rgba(26, 24, 21, 0.4);
}

.work-preview__caption {
  color: var(--surface);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.work-preview__item:hover .work-preview__caption {
  opacity: 1;
  transform: translateY(0);
}

.work-preview__link {
  display: flex;
  justify-content: flex-end;
  margin-top: 32px;
}

.work-preview__link a {
  transition: color var(--duration) var(--ease);
}

.work-preview__link a:hover {
  color: var(--ink);
}


/* ============================================================
   HOME — THE ARTIST
   ============================================================ */

.artist-intro {
  text-align: center;
  padding-bottom: var(--section-spacing);
}

.artist-intro__text {
  max-width: 640px;
  margin: 0 auto 32px;
}

.artist-intro__link {
  transition: color var(--duration) var(--ease);
}

.artist-intro__link:hover {
  color: var(--ink);
}


/* ============================================================
   WORK PAGE — MASONRY GRID
   ============================================================ */

.work-page {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: var(--section-spacing);
}

.work-page__title {
  text-align: center;
  margin-bottom: 80px;
}

.work-grid {
  columns: 2;
  column-gap: 24px;
}

.work-grid__item {
  break-inside: avoid;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.work-grid__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 24, 21, 0);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  transition: background var(--duration) var(--ease);
}

.work-grid__item:hover .work-grid__overlay {
  background: rgba(26, 24, 21, 0.4);
}

.work-grid__caption {
  color: var(--surface);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.work-grid__item:hover .work-grid__caption {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(26, 24, 21, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease);
  padding: 40px;
}

.lightbox--open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--surface);
  z-index: 2001;
}

.lightbox__close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
}

.lightbox__image {
  max-width: 90vw;
  max-height: 85vh;
  background-color: var(--placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__image img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox__caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(253, 251, 248, 0.7);
  text-align: center;
}


/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-page {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: var(--section-spacing);
}

.about__portrait {
  width: 50%;
  max-width: 480px;
  margin: 0 auto 80px;
}

.about__statement {
  max-width: 700px;
  margin: 0 auto 48px;
  text-align: center;
}

.about__body {
  max-width: 600px;
  margin: 0 auto 48px;
}

.about__body p + p {
  margin-top: 24px;
}

.about__cta {
  text-align: center;
}

.about__cta a {
  transition: color var(--duration) var(--ease);
}

.about__cta a:hover {
  color: var(--ink);
}


/* ============================================================
   SERVICES PAGE
   ============================================================ */

.services-page {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: var(--section-spacing);
}

.services__title {
  text-align: center;
  margin-bottom: 80px;
}

.service-block {
  display: grid;
  grid-template-columns: 46fr 54fr;
  gap: 72px;
  align-items: center;
  margin-bottom: var(--section-spacing);
}

.service-block:nth-child(even) {
  direction: rtl;
}

.service-block:nth-child(even) > * {
  direction: ltr;
}

.service-block__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.service-block__text {
  color: var(--muted);
  max-width: 420px;
}

.service-block__link {
  transition: color var(--duration) var(--ease);
}

.service-block__link:hover {
  color: var(--ink);
}

.service-block:last-child {
  margin-bottom: 0;
}


/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-page {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: var(--section-spacing);
}

.contact__grid {
  display: grid;
  grid-template-columns: 40fr 60fr;
  gap: 80px;
  align-items: start;
}

.contact__intro {
  position: sticky;
  top: calc(var(--nav-height) + 40px);
}

.contact__intro-text {
  color: var(--muted);
  margin-top: 28px;
  max-width: 320px;
}

.contact__line-oa {
  margin-top: 40px;
}

.contact__line-oa a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--duration) var(--ease);
}

.contact__line-oa a:hover {
  color: var(--ink);
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
}

.form__input,
.form__select,
.form__textarea {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--ink);
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--placeholder);
  padding: 8px 0;
  outline: none;
  transition: border-color var(--duration) var(--ease);
  width: 100%;
  border-radius: 0;
  -webkit-appearance: none;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  border-color: var(--gold);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--placeholder);
}

.form__select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237A7570' fill='none' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 20px;
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

.form__submit {
  align-self: flex-start;
  margin-top: 8px;
}

.form__note {
  color: var(--muted);
  margin-top: -16px;
}

/* Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background-color: var(--ink);
  color: var(--surface);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}


/* ============================================================
   PAGE SPACER (ensures body content clears the fixed nav)
   ============================================================ */

.page-spacer {
  height: var(--nav-height);
}


/* ============================================================
   FADE-IN ANIMATION
   ============================================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease),
              transform 0.6s var(--ease);
}

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


/* ============================================================
   RESPONSIVE — TABLET (< 1440px)
   ============================================================ */

@media (max-width: 1439px) {
  :root {
    --section-spacing: 96px;
  }

  .hero__grid {
    gap: 40px;
  }

  .service-block {
    gap: 40px;
  }
}


/* ============================================================
   RESPONSIVE — MOBILE (< 768px)
   ============================================================ */

@media (max-width: 767px) {
  :root {
    --section-spacing: 72px;
    --nav-height: 64px;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Nav */
  .nav__lang,
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .nav__logo {
    position: relative;
    left: auto;
    transform: none;
  }

  .nav__inner {
    justify-content: center;
    position: relative;
  }

  .nav__hamburger {
    position: absolute;
    right: 24px;
  }

  /* Hero */
  .hero {
    padding-top: calc(var(--nav-height) + 40px);
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero__image {
    order: -1;
  }

  .hero__headline {
    max-width: 100%;
  }

  .hero__subtext {
    max-width: 100%;
  }

  /* Work preview */
  .work-preview__grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .work-preview__item:nth-child(2) {
    margin-top: 32px;
  }

  .work-preview__item:nth-child(3) {
    display: none;
  }

  /* Work page masonry */
  .work-grid {
    columns: 1;
  }

  /* Service blocks */
  .service-block {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .service-block:nth-child(even) {
    direction: ltr;
  }

  .service-block__image {
    order: -1;
  }

  /* Contact */
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact__intro {
    position: static;
  }

  /* About */
  .about__portrait {
    max-width: 100%;
  }

  /* Lightbox */
  .lightbox {
    padding: 20px;
  }

  /* Footer */
  .footer {
    padding-top: 60px;
    padding-bottom: 40px;
  }

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

  .footer__sep {
    display: none;
  }
}
