:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --surface: #ffffff;
  --ink: #20231f;
  --muted: #6d716a;
  --line: #ddded8;
  --sage: #7a8f78;
  --clay: #a65f46;
  --soft-blue: #dbe5e7;
  --shadow: 0 20px 60px rgba(32, 35, 31, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 64px);
  background: rgba(247, 246, 242, 0.86);
  border-bottom: 1px solid rgba(221, 222, 216, 0.7);
  backdrop-filter: blur(18px);
}

.brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  color: var(--muted);
  font-size: 14px;
}

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

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 78px);
  padding: 38px 0 72px;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--clay);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(42px, 7vw, 78px);
  max-width: 720px;
}

h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.lead {
  margin: 24px 0 0;
  max-width: 600px;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 19px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button,
.quick-form button,
.upload-button,
.text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 18px;
  cursor: pointer;
}

.primary,
.quick-form button {
  background: var(--ink);
  color: #fff;
}

.secondary,
.upload-button {
  background: var(--surface);
  border-color: var(--line);
}

.text-button {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.button:hover,
.quick-form button:hover,
.upload-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.hero-media {
  margin: 0;
  min-height: 520px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #7a8f78, #a65f46 48%, #52666a);
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: block;
  object-fit: cover;
}

.section {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.section-note {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.quick-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) auto;
  gap: 12px;
  margin-bottom: 28px;
}

.quick-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.quick-form input,
.quick-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

.quick-form button {
  align-self: end;
}

.favorite-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.favorite-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.favorite-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.favorite-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tag {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: #334348;
  font-size: 12px;
}

.photo-section {
  padding-bottom: 96px;
}

.upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.photo-item,
.photo-placeholder {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.photo-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.photo-item img[hidden] {
  display: none;
}

.photo-item:has(img[hidden]) {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, var(--sage), var(--clay));
}

.photo-item figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  display: grid;
  gap: 2px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-size: 13px;
}

.photo-item figcaption strong {
  font-size: 13px;
  line-height: 1.3;
}

.photo-item figcaption span {
  color: var(--muted);
  font-size: 12px;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(32, 35, 31, 0.08), rgba(32, 35, 31, 0)),
    linear-gradient(145deg, var(--sage), var(--clay));
}

.photo-placeholder:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #52666a, #a08268);
}

.photo-placeholder:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #6d7f61, #445461);
}

.photo-placeholder span {
  font-size: 20px;
  font-weight: 700;
}

.about {
  max-width: 760px;
}

.about p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

footer {
  width: min(1180px, calc(100% - 40px));
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 28px 0 44px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 880px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 36px;
  }

  .hero-media,
  .hero-media img {
    min-height: 360px;
  }

  .section-heading {
    display: block;
  }

  .section-note {
    max-width: none;
    margin-top: 12px;
    text-align: left;
  }

  .quick-form,
  .favorite-grid,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: 38px;
  }

  .section {
    padding: 64px 0;
  }

  .hero-media,
  .hero-media img {
    min-height: 300px;
  }
}
