:root {
  --ink: #1b1b1b;
  --text: #5e5e5e;
  --label: #8f6e6e;
  --phone: #826c6c;
  --line: #d9d9d9;
  --serif: "Gentium Basic", Georgia, serif;
  --script: "Dancing Script", cursive;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Header */
.site-header {
  padding: 2.75rem 0 1.5rem;
}

.header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.header-phone {
  color: var(--phone);
  font-size: 1.35rem;
  text-decoration: none;
}

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

.logo {
  justify-self: center;
  font-family: var(--script);
  font-size: 1.4rem;
  color: #151515;
  text-decoration: none;
  border: 1px solid #151515;
  padding: 0.3rem 0.8rem;
  letter-spacing: 0.03em;
}

.logo:hover {
  color: #151515;
}

.header-icons {
  justify-self: end;
}

.header-icons a {
  color: #898989;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.4rem;
}

.main-nav a {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.21em;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid transparent;
}

.main-nav a.active,
.main-nav a:hover {
  border-bottom-color: #919191;
}

@media (max-width: 575px) {
  .header-top {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    text-align: center;
  }

  .header-phone {
    order: 2;
    font-size: 1.1rem;
  }

  .header-icons {
    display: none;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 75vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

.hero-content {
  position: relative;
  max-width: 520px;
  padding: 2rem 1rem;
  color: #f7f7f7;
}

.hero-eyebrow {
  font-family: var(--serif);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.125em;
  color: #fff;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--script);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

.hero-text {
  margin-bottom: 2.5rem;
}

/* Buttons */
.btn-outline-light-square,
.btn-outline-dark-square,
.btn-dark-square {
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.21em;
  padding: 0.95rem 1.75rem;
  text-decoration: none;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.btn-outline-light-square {
  color: #f7f7f7;
  border: 1px solid #f7f7f7;
  background: transparent;
}

.btn-outline-light-square:hover {
  background: #f7f7f7;
  color: var(--ink);
}

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

.btn-outline-dark-square:hover {
  background: var(--ink);
  color: #fff;
}

.btn-dark-square {
  color: #fff;
  border: 1px solid #000;
  background: #000;
}

.btn-dark-square:hover {
  background: #333;
  color: #fff;
}

/* Sections & type */
.section {
  padding: 3.5rem 0;
}

.section-label {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.125em;
  color: var(--label);
  margin-bottom: 2rem;
}

.sub-heading {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: 0.045em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.body-text {
  color: var(--text);
  line-height: 1.6;
}

.script-heading {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  color: var(--ink);
}

.about-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Gallery carousel */
.gallery-stage {
  position: relative;
  height: min(70vh, 640px);
  background: #fff;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-slide.active {
  opacity: 1;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(22, 22, 22, 0.25);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-arrow:hover {
  background: rgba(22, 22, 22, 0.5);
}

.gallery-arrow.prev {
  left: 0.75rem;
}

.gallery-arrow.next {
  right: 0.75rem;
}

.gallery-thumbs {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 1rem 0 0.25rem;
  scrollbar-width: thin;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  opacity: 0.7;
  cursor: pointer;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.active {
  border-color: var(--label);
  opacity: 1;
}

.gallery-thumb:hover {
  opacity: 1;
}

/* Discover */
.discover {
  padding: 2rem 0;
  overflow: hidden;
}

.discover-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.discover-content {
  padding: 2.5rem 1.5rem 2.5rem 3rem;
  max-width: 480px;
}

.discover-hello {
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.discover-text {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--text);
  margin: 1rem 0 2.5rem;
}

@media (max-width: 767px) {
  .discover-content {
    padding: 2rem 1rem;
  }
}

/* Forms */
.line-field {
  margin-bottom: 1.5rem;
}

.line-field input,
.line-field textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0.25rem;
  outline: none;
}

.line-field textarea.boxed {
  border: 1px solid var(--line);
  padding: 0.9rem;
}

.line-field input:focus,
.line-field textarea:focus {
  border-color: var(--ink);
}

.field-error {
  display: block;
  color: #b0413e;
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.form-success {
  color: #2f6b3a;
  margin-bottom: 1rem;
}

.form-error {
  color: #b0413e;
  margin-bottom: 1rem;
}

.form-success.light {
  color: #fff;
}

.contact-link {
  color: var(--label);
  text-decoration: none;
}

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

/* Mailing list */
.mailing {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #f7f7f7;
  text-align: center;
  padding: 3.5rem 0;
}

.mailing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(150, 150, 150, 0.82);
}

.mailing .container {
  position: relative;
  max-width: 640px;
}

.mailing-form {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}

.mailing-form .line-field {
  flex: 1;
  margin-bottom: 0;
}

.line-field.light input {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.8);
}

.line-field.light input::placeholder {
  color: rgba(255, 255, 255, 0.9);
}

.line-field.light .field-error {
  color: #fff;
}

@media (max-width: 575px) {
  .mailing-form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Shop */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.shop-item {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f4f4f4;
}

.shop-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.shop-item:hover img {
  transform: scale(1.04);
}

/* Admin */
.admin-narrow {
  max-width: 420px;
}

.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--label);
  font-family: var(--serif);
  cursor: pointer;
}

.admin-link-button:hover {
  color: var(--ink);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-search {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex: 1;
  max-width: 520px;
}

.admin-search .line-field {
  flex: 1;
}

.admin-search .btn-outline-dark-square,
.admin-toolbar .btn-dark-square {
  padding: 0.7rem 1.25rem;
}

.admin-tabs {
  display: flex;
  gap: 1.75rem;
}

.admin-tabs a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid transparent;
}

.admin-tabs a.active,
.admin-tabs a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.admin-link-button.danger,
.icon-button.danger {
  color: #b0413e;
}

.admin-alert {
  padding: 0.8rem 1rem;
  margin-bottom: 1.5rem;
  border-left: 3px solid;
}

.admin-alert.success {
  background: #eef6ef;
  border-color: #2f6b3a;
  color: #2f6b3a;
}

.admin-alert.error {
  background: #fbefee;
  border-color: #b0413e;
  color: #8a2f2c;
}

.gallery-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}

.gallery-jump a {
  color: var(--label);
  text-decoration: none;
  font-size: 0.95rem;
}

.gallery-jump a span {
  color: #999;
}

.admin-gallery {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  scroll-margin-top: 1rem;
}

.admin-gallery-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.rename-form {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex: 1;
  max-width: 640px;
}

.rename-form .line-field {
  flex: 1;
}

.rename-form .line-field input {
  font-size: 1.15rem;
}

.btn-sm-square {
  padding: 0.6rem 1.1rem !important;
  font-size: 0.75rem !important;
  white-space: nowrap;
}

.btn-sm-square:disabled {
  opacity: 0.6;
  cursor: wait;
}

.upload-form {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.upload-drop {
  flex: 1;
  position: relative;
  border: 1px dashed #bbb;
  padding: 0.6rem 1rem;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.upload-drop:hover {
  border-color: var(--ink);
}

.upload-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.settings-block {
  max-width: 720px;
}

.settings-note {
  font-size: 0.85rem;
  color: #888;
  margin: 0.75rem 0 1.25rem;
}

.data-path {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95rem;
  background: #f4f4f4;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.4rem;
  word-break: break-all;
}

.data-status.ok {
  color: #2f6b3a;
  margin-bottom: 0.75rem;
}

.data-list {
  font-size: 0.85rem;
  color: var(--text);
  padding-left: 1.2rem;
  margin: 0;
}

.confirm-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  cursor: pointer;
}

.danger-button {
  color: #b0413e;
  border-color: #b0413e;
}

.danger-button:hover {
  background: #b0413e;
  color: #fff;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.slot-card {
  display: flex;
  gap: 1rem;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.85rem;
  scroll-margin-top: 1rem;
}

.slot-card:target {
  outline: 2px solid var(--label);
}

.slot-img {
  flex: 0 0 120px;
  height: 120px;
  background: #f4f4f4;
}

.slot-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slot-body {
  flex: 1;
  min-width: 0;
}

.slot-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.slot-hint {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.slot-upload {
  margin-bottom: 0.4rem;
  flex-direction: column;
  gap: 0.5rem;
}

.slot-upload .upload-drop {
  font-size: 0.85rem;
  padding: 0.45rem 0.7rem;
}

.admin-pictures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.admin-picture {
  border: 1px solid var(--line);
  background: #fff;
  scroll-margin-top: 1rem;
}

.admin-picture:target {
  outline: 2px solid var(--label);
}

.admin-picture-img {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: #f4f4f4;
}

.admin-picture-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-picture-num {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.05rem 0.4rem;
}

.admin-picture-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.admin-picture-actions form {
  flex: 1;
}

.icon-button {
  width: 100%;
  background: none;
  border: none;
  padding: 0.35rem 0;
  font-size: 1.1rem;
  color: var(--ink);
  cursor: pointer;
}

.icon-button:hover:not(:disabled) {
  background: #f4f4f4;
}

.icon-button:disabled {
  color: #ccc;
  cursor: default;
}

.move-to-form select {
  width: 100%;
  border: none;
  border-top: 1px solid var(--line);
  padding: 0.35rem 0.4rem;
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--text);
  background: #fff;
  cursor: pointer;
}

@media (max-width: 575px) {
  .rename-form,
  .upload-form {
    flex-direction: column;
    align-items: stretch;
  }
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  font-weight: 400;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--label);
  border-bottom: 1px solid var(--ink);
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  color: var(--text);
}

.admin-table td:first-child,
.admin-table th:first-child {
  width: 3rem;
  color: #999;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2.5rem;
  font-size: 0.75rem;
  color: var(--text);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy,
.footer-powered {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.footer-powered {
  margin-top: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--label);
  text-decoration: none;
  font-size: 0.9rem;
}

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