/* ============================================================
   Photosyncity · 光合城市 — Redesigned
   Inspired by Function Health design system
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,300;1,400&family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

:root {
  /* Font families */
  --font-serif: 'Playfair Display', Georgia, 'Noto Sans SC', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Noto Sans SC', sans-serif;

  /* Colors */
  --beige: #FEF9EF;
  --cream: #F5EEE1;
  --dark-cream: #D1C9BF;
  --light-gray: #737373;
  --gray: #515151;
  --midnight: #2A2B2F;
  --orange: #B05A36;
  --green: #79BD8B;
  --blue: #488AD5;
  --white: #FFFFFF;

  --text-01: #FEF9EF;
  --text-02: #515151;
  --text-03: #2A2B2F;
  --text-04: #B05A36;
  --text-05: #737373;

  --fill-01: #FEF9EF;
  --fill-02: #F5EEE1;
  --fill-03: #2A2B2F;
  --fill-04: #B05A36;

  --stroke-01: #FEF9EF;
  --stroke-02: #D1C9BF;
  --stroke-03: #2A2B2F;
  --stroke-05: #B05A36;
  --stroke-06: #737373;

  /* Spacing */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: clamp(0.75rem, 0.38vw + 0.66rem, 1rem);
  --s5: clamp(1rem, 0.38vw + 0.91rem, 1.25rem);
  --s6: clamp(1.25rem, 0.38vw + 1.16rem, 1.5rem);
  --s7: clamp(1.5rem, 0.75vw + 1.32rem, 2rem);
  --s8: clamp(2rem, 0.75vw + 1.82rem, 2.5rem);
  --s9: clamp(2.5rem, 1.5vw + 2.15rem, 3.5rem);
  --s10: clamp(3rem, 1.5vw + 2.65rem, 4rem);
  --s12: clamp(4.5rem, 2.26vw + 3.97rem, 6rem);
  --s13: clamp(5rem, 3.76vw + 4.12rem, 7.5rem);

  /* Fluid type scale */
  --heading-xl: clamp(3.375rem, 4.32vw + 2.36rem, 6.25rem);
  --h1: clamp(2.5rem, 2.16vw + 2.05rem, 4rem);
  --h2: clamp(2.125rem, 1.5vw + 1.77rem, 3.25rem);
  --h3: clamp(1.625rem, 1.03vw + 1.38rem, 2.4rem);
  --h4: clamp(1.375rem, 0.66vw + 1.22rem, 1.875rem);
  --text-xl: clamp(1.125rem, 0.56vw + 0.99rem, 1.5rem);
  --text-lg: clamp(1.0625rem, 0.19vw + 1.02rem, 1.1875rem);
  --text-md: clamp(0.9375rem, 0.19vw + 0.89rem, 1.0625rem);
  --text-regular: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --tagline: clamp(0.75rem, 0.38vw + 0.66rem, 1rem);

  /* Radii */
  --radius-xl: clamp(1.5rem, 1.5vw + 1.15rem, 2.5rem);
  --radius-large: clamp(1rem, 0.75vw + 0.82rem, 1.5rem);
  --radius-base: 0.75rem;
  --radius-sm: 0.375rem;
  --radius-xs: 0.25rem;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, picture, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-03);
  background-color: var(--fill-01);
  line-height: 1.6;
  font-size: var(--text-regular);
  overflow-x: clip;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4.14vw + 0.28rem, 4rem);
}

/* --- Typography --- */
.serif {
  font-family: var(--font-serif);
  font-weight: 400;
}

.serif-light-italic {
  font-family: var(--font-serif);
  font-weight: 300;
  font-style: italic;
}

h1, .h1 { font-size: var(--h1); line-height: 1.15; font-weight: 400; }
h2, .h2 { font-size: var(--h2); line-height: 1.2; font-weight: 400; letter-spacing: -0.01em; }
h3, .h3 { font-size: var(--h3); line-height: 1.25; font-weight: 400; }
h4, .h4 { font-size: var(--h4); line-height: 1.3; font-weight: 500; }

.text-xl { font-size: var(--text-xl); line-height: 1.5; }
.text-lg { font-size: var(--text-lg); line-height: 1.6; }
.text-md { font-size: var(--text-md); line-height: 1.6; }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }

.section-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--tagline);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-04);
  margin-bottom: var(--s3);
  font-weight: 500;
}

/* --- Section --- */
.section {
  padding: var(--s13) 0;
}

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

.section-alt {
  background-color: var(--fill-02);
}

.section-title {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto var(--s10);
}

.section-title h2 {
  margin-bottom: var(--s4);
}

.section-title p {
  color: var(--text-05);
  font-size: var(--text-lg);
  line-height: 1.6;
}

/* --- Topbar / Navigation --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(254, 249, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stroke-02);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: clamp(3.5rem, 2vw + 3rem, 4.5rem);
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4.14vw + 0.28rem, 4rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-03);
}

.brand img {
  height: clamp(1.75rem, 1.5vw + 1.4rem, 2.5rem);
  width: auto;
}

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

.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-02);
  padding: var(--s1) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--text-04);
  border-bottom-color: var(--text-04);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-03);
  cursor: pointer;
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: var(--s12) 0 0;
  background: var(--fill-01);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s9);
  align-items: center;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4.14vw + 0.28rem, 4rem);
}

.hero-tag {
  display: inline-block;
  font-size: var(--tagline);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-04);
  margin-bottom: var(--s4);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: var(--heading-xl);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: var(--s5);
}

.hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: var(--text-04);
}

.hero p {
  font-size: var(--text-xl);
  color: var(--text-05);
  line-height: 1.6;
  margin-bottom: var(--s7);
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  gap: var(--s4);
  margin-bottom: var(--s9);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-visual img {
  width: 85%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 20px 60px rgba(42, 43, 47, 0.08);
  aspect-ratio: 1;
  object-fit: cover;
}

.hero-stats {
  display: flex;
  gap: var(--s8);
  padding: var(--s7) 0;
  border-top: 1px solid var(--stroke-02);
  max-width: 90rem;
  margin: 0 auto;
  padding-left: clamp(1.25rem, 4.14vw + 0.28rem, 4rem);
  padding-right: clamp(1.25rem, 4.14vw + 0.28rem, 4rem);
}

.hero-stat-num {
  font-family: var(--font-serif);
  font-size: var(--h2);
  line-height: 1;
  color: var(--text-04);
  margin-bottom: var(--s1);
}

.hero-stat-label {
  font-size: var(--text-sm);
  color: var(--text-05);
  font-weight: 400;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 0.75rem 1.75rem;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-base);
  transition: all 0.25s ease;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-primary {
  background: var(--fill-04);
  color: var(--text-01);
  border: 1px solid var(--fill-04);
}

.btn-primary:hover {
  background: var(--fill-03);
  border-color: var(--fill-03);
}

.btn-outline {
  background: transparent;
  color: var(--text-04);
  border: 1px solid var(--stroke-05);
}

.btn-outline:hover {
  background: var(--fill-03);
  color: var(--text-01);
  border-color: var(--fill-03);
}

.btn-light {
  background: var(--fill-01);
  color: var(--text-04);
  border: 1px solid var(--fill-01);
}

.btn-light:hover {
  background: var(--fill-04);
  color: var(--text-01);
}

/* --- Text Link --- */
.fh-text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-04);
  transition: color 0.2s;
}

.fh-text-link:hover {
  color: var(--text-03);
}

.fh-link-arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.fh-text-link:hover .fh-link-arrow {
  transform: translateX(4px);
}

/* --- Cards Grid --- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s7);
}

.card {
  background: var(--white);
  border: 1px solid var(--stroke-02);
  border-radius: var(--radius-large);
  padding: var(--s8);
  transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
  box-shadow: 0 8px 30px rgba(42, 43, 47, 0.06);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: var(--s4);
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fill-02);
  border-radius: var(--radius-base);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: var(--h4);
  margin-bottom: var(--s3);
  line-height: 1.3;
}

.card p {
  font-size: var(--text-md);
  color: var(--text-05);
  line-height: 1.65;
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s7);
}

.product-card {
  background: var(--white);
  border: 1px solid var(--stroke-02);
  border-radius: var(--radius-large);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}

.product-card:hover {
  box-shadow: 0 8px 30px rgba(42, 43, 47, 0.06);
  transform: translateY(-2px);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--fill-02);
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card-img img {
  transform: scale(1.05);
}

.product-card-body {
  padding: var(--s6) var(--s7) var(--s7);
}

.product-card-body h3 {
  font-family: var(--font-serif);
  font-size: var(--h4);
  margin-bottom: var(--s2);
}

.product-card-body p {
  font-size: var(--text-md);
  color: var(--text-05);
  line-height: 1.65;
  margin-bottom: var(--s4);
}

.product-card-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-04);
  padding: var(--s1) var(--s3);
  background: rgba(176, 90, 54, 0.08);
  border-radius: 999px;
}

/* --- Stats --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s7);
}

.stat-card {
  text-align: center;
  padding: var(--s8) var(--s6);
  border: 1px solid var(--stroke-02);
  border-radius: var(--radius-large);
  background: var(--white);
}

.stat-card h3 {
  font-family: var(--font-serif);
  font-size: var(--h1);
  color: var(--text-04);
  line-height: 1;
  margin-bottom: var(--s2);
}

.stat-card p {
  font-size: var(--text-md);
  color: var(--text-05);
}

/* --- ESG Grid --- */
.esg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s6);
}

.esg-card {
  padding: var(--s8);
  background: var(--white);
  border: 1px solid var(--stroke-02);
  border-radius: var(--radius-large);
  text-align: center;
  transition: box-shadow 0.3s;
}

.esg-card:hover {
  box-shadow: 0 8px 30px rgba(42, 43, 47, 0.06);
}

.esg-card-icon {
  font-size: 2.5rem;
  margin-bottom: var(--s4);
}

.esg-card h4 {
  font-family: var(--font-serif);
  margin-bottom: var(--s2);
}

.esg-card p {
  font-size: var(--text-sm);
  color: var(--text-05);
  line-height: 1.6;
}

/* --- Inline Banner --- */
.inline-banner {
  padding: var(--s10) 0;
}

.inline-banner__card {
  display: flex;
  align-items: center;
  gap: var(--s8);
  padding: var(--s8);
  background: var(--white);
  border: 1px solid var(--stroke-02);
  border-radius: var(--radius-xl);
}

.inline-banner__icon {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
}

.inline-banner__content {
  flex: 1;
}

.inline-banner__headline {
  font-family: var(--font-serif);
  font-size: var(--h4);
  margin-bottom: var(--s2);
}

.inline-banner__description {
  font-size: var(--text-md);
  color: var(--text-05);
}

.inline-banner__button {
  flex-shrink: 0;
}

/* --- About Page --- */
.about-hero {
  text-align: center;
  padding: var(--s12) 0 var(--s10);
}

.about-hero h1 {
  font-family: var(--font-serif);
  font-size: var(--heading-xl);
  margin-bottom: var(--s4);
}

.about-hero p {
  font-size: var(--text-xl);
  color: var(--text-05);
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.7;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s7);
}

.team-card {
  text-align: center;
  padding: var(--s8);
  border: 1px solid var(--stroke-02);
  border-radius: var(--radius-large);
  background: var(--white);
}

.team-card-avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: var(--fill-02);
  margin: 0 auto var(--s5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-04);
}

.team-card h3 {
  font-family: var(--font-serif);
  font-size: var(--h4);
  margin-bottom: var(--s1);
}

.team-card .role {
  font-size: var(--text-sm);
  color: var(--text-04);
  font-weight: 500;
  margin-bottom: var(--s3);
}

.team-card p {
  font-size: var(--text-md);
  color: var(--text-05);
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s9);
  align-items: start;
}

.contact-info h2 {
  font-family: var(--font-serif);
  font-size: var(--h2);
  margin-bottom: var(--s5);
}

.contact-info-item {
  display: flex;
  gap: var(--s4);
  margin-bottom: var(--s6);
}

.contact-info-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fill-02);
  border-radius: var(--radius-base);
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-info-text h4 {
  font-size: var(--text-regular);
  font-weight: 600;
  margin-bottom: var(--s1);
}

.contact-info-text p,
.contact-info-text a {
  font-size: var(--text-md);
  color: var(--text-05);
  line-height: 1.6;
}

.contact-form {
  background: var(--white);
  padding: var(--s8);
  border: 1px solid var(--stroke-02);
  border-radius: var(--radius-large);
}

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

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--s2);
  color: var(--text-03);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--s3) var(--s4);
  font-size: var(--text-regular);
  font-family: var(--font-sans);
  border: 1px solid var(--stroke-02);
  border-radius: var(--radius-base);
  background: var(--fill-01);
  color: var(--text-03);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--text-04);
}

.form-group textarea {
  height: 8rem;
  resize: vertical;
}

/* --- Technology Page --- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s7);
  counter-reset: step;
}

.process-step {
  counter-increment: step;
  position: relative;
  padding: var(--s7);
  background: var(--white);
  border: 1px solid var(--stroke-02);
  border-radius: var(--radius-large);
}

.process-step::before {
  content: "0" counter(step);
  position: absolute;
  top: var(--s5);
  right: var(--s6);
  font-family: var(--font-serif);
  font-size: var(--h1);
  color: rgba(176, 90, 54, 0.1);
  font-weight: 400;
  line-height: 1;
}

.process-step h3 {
  font-family: var(--font-serif);
  font-size: var(--h4);
  margin-bottom: var(--s3);
  position: relative;
}

.process-step p {
  font-size: var(--text-md);
  color: var(--text-05);
  line-height: 1.65;
  position: relative;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s7);
}

.benefit-card {
  text-align: center;
  padding: var(--s8);
  border: 1px solid var(--stroke-02);
  border-radius: var(--radius-large);
  background: var(--white);
}

.benefit-number {
  font-family: var(--font-serif);
  font-size: var(--h1);
  color: var(--text-04);
  line-height: 1;
  margin-bottom: var(--s3);
}

.benefit-card h4 {
  font-family: var(--font-serif);
  margin-bottom: var(--s3);
}

.benefit-card p {
  font-size: var(--text-md);
  color: var(--text-05);
  line-height: 1.65;
  text-align: left;
}

/* --- Footer --- */
.footer {
  background: var(--fill-03);
  color: var(--text-01);
  padding: var(--s10) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s8);
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4.14vw + 0.28rem, 4rem);
}

.footer h4 {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  margin-bottom: var(--s5);
  color: var(--text-01);
}

.footer p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: rgba(254, 249, 239, 0.7);
  max-width: 300px;
}

.footer a {
  display: block;
  font-size: var(--text-sm);
  color: rgba(254, 249, 239, 0.7);
  margin-bottom: var(--s3);
  transition: color 0.2s;
}

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

.footer-brand img {
  height: 2rem;
  width: auto;
  margin-bottom: var(--s4);
  filter: brightness(0) invert(1);
}

.footer-bottom {
  text-align: center;
  padding: var(--s7);
  margin-top: var(--s9);
  border-top: 1px solid rgba(254, 249, 239, 0.12);
  font-size: var(--text-xs);
  color: rgba(254, 249, 239, 0.5);
}

/* --- Page Header --- */
.page-header {
  padding: var(--s10) 0 var(--s8);
  text-align: center;
  background: var(--fill-02);
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: var(--heading-xl);
  margin-bottom: var(--s3);
}

.page-header p {
  font-size: var(--text-xl);
  color: var(--text-05);
  max-width: 32rem;
  margin: 0 auto;
}

/* --- CTA Section --- */
.cta-section {
  padding: var(--s12) 0;
  text-align: center;
  background: var(--fill-02);
}

.cta-section h2 {
  font-family: var(--font-serif);
  font-size: var(--h2);
  margin-bottom: var(--s4);
}

.cta-section p {
  font-size: var(--text-lg);
  color: var(--text-05);
  max-width: 32rem;
  margin: 0 auto var(--s7);
}

.cta-actions {
  display: flex;
  gap: var(--s4);
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Mobile --- */
@media (max-width: 767px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--s6);
    text-align: center;
  }

  .hero p {
    margin: 0 auto var(--s6);
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual img {
    width: 70%;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--s5);
    text-align: center;
    padding-top: var(--s5);
  }

  .cards,
  .product-grid,
  .stats-grid,
  .esg-grid,
  .benefit-grid,
  .process-steps,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--s7);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .inline-banner__card {
    flex-direction: column;
    text-align: center;
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--fill-01);
    border-bottom: 1px solid var(--stroke-02);
    padding: var(--s5) clamp(1.25rem, 4.14vw + 0.28rem, 4rem);
    gap: var(--s4);
  }
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}
