/* ===================================
   T's Lab — Shared Styles
   =================================== */

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

/* --- CSS Variables --- */
:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #6b6b6b;
  --color-text-tertiary: #9a9a9a;
  --color-border: #e8e8e6;
  --color-border-light: #f0f0ee;
  --color-accent: #2563eb;
  --color-accent-bg: #eff6ff;
  --color-accent-text: #1d4ed8;
  --color-success-bg: #f0fdf4;
  --color-success-text: #15803d;
  --color-danger: #dc2626;
  --font-sans: 'DM Sans', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 860px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.7;
}

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

/* --- Layout --- */
.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
}

.site-header .site-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.site-logo {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.3px;
  text-decoration: none;
}

.site-logo:hover {
  opacity: 1;
}

.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.site-nav a {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  letter-spacing: 0.2px;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-text);
  opacity: 1;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 72px 0 56px;
}

.hero-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 15px;
  color: var(--color-text-secondary);
  font-weight: 300;
}

/* --- Screenshot Slideshow --- */
.screenshot-viewer {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  margin-bottom: 24px;
}

.screenshot-slide {
  display: none;
}

.screenshot-slide.is-active {
  display: block;
  animation: fadeIn 0.6s ease;
}

.screenshot-slide img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slideshow-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.15));
}

.slideshow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background var(--transition);
}

.slideshow-dot.is-active {
  background: rgba(255,255,255,0.95);
}

/* --- iOS App Screenshots --- */
.app-screenshots {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.app-screenshots::-webkit-scrollbar {
  display: none;
}

.app-screenshot-item {
  flex: 0 0 45%;
  scroll-snap-align: start;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  background: var(--color-bg);
}

.app-screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Product Cards --- */
.products-section {
  padding-bottom: 64px;
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  border-color: #d0d0ce;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.product-card--main {
  margin-bottom: 16px;
}

.product-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.product-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.product-name--sm {
  font-size: 16px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.badge--platform {
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
}

.badge--free {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.product-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  font-weight: 300;
}

.product-screenshot {
  width: 100%;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  font-size: 13px;
  overflow: hidden;
}

.product-screenshot--main {
  height: 240px;
  margin-bottom: 24px;
}

.product-screenshot--sub {
  height: 160px;
  margin-bottom: 16px;
}

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

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.feature-tag {
  font-size: 12px;
  font-weight: 400;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  background: var(--color-surface);
  transition: border-color var(--transition);
}

.feature-tag:hover {
  border-color: #c0c0be;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: var(--color-text);
  color: var(--color-surface);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
  letter-spacing: 0.2px;
}

.cta-button:hover {
  opacity: 0.85;
  color: var(--color-surface);
}

.cta-button:active {
  transform: scale(0.98);
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent);
}

.cta-link:hover {
  opacity: 0.7;
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- Page Header (for sub-pages) --- */
.page-header {
  padding: 56px 0 12px;
  text-align: center;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.page-lead {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-weight: 300;
  line-height: 1.7;
}

/* --- Contact Form --- */
.contact-form {
  max-width: 520px;
  margin: 0 auto;
  padding: 8px 0 64px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.form-label .required {
  color: var(--color-danger);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-tertiary);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' fill='none' stroke='%236b6b6b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

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

.form-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.form-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  font-weight: 400;
}

.form-radio-label input[type="radio"] {
  accent-color: var(--color-accent);
  cursor: pointer;
}

.form-submit {
  width: 100%;
  padding: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  background: var(--color-text);
  color: var(--color-surface);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  letter-spacing: 0.2px;
}

.form-submit:hover {
  opacity: 0.85;
}

.form-submit:active {
  transform: scale(0.99);
}

.form-note {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 14px;
}

/* --- Privacy Policy --- */
.privacy-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 8px 0 64px;
}

.privacy-content .update-date {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-bottom: 40px;
}

.privacy-section {
  margin-bottom: 36px;
}

.privacy-section h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.privacy-section p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  font-weight: 300;
}

.privacy-apps-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 36px;
}

.privacy-apps-box .box-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-tertiary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.privacy-apps-box ul {
  list-style: none;
  font-size: 14px;
  line-height: 2;
  color: var(--color-text);
}

.privacy-apps-box ul li::before {
  content: "·";
  margin-right: 10px;
  color: var(--color-text-tertiary);
  font-weight: 600;
}

.privacy-note {
  border-left: 3px solid var(--color-border);
  padding: 16px 20px;
  margin-bottom: 36px;
}

.privacy-note p {
  font-size: 13px;
  color: var(--color-text-tertiary);
  line-height: 1.7;
}

.privacy-lead {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 36px;
}

.privacy-list {
  list-style: none;
  margin-top: 12px;
}

.privacy-list li {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  font-weight: 300;
  padding-left: 16px;
  position: relative;
  margin-bottom: 12px;
}

.privacy-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
}

.privacy-list li strong {
  font-weight: 500;
  color: var(--color-text);
}

.privacy-contact-info {
  margin-top: 12px;
  padding: 16px 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
}

.privacy-contact-info p {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 0;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border-light);
  margin-top: 16px;
}

.site-footer .site-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.footer-copy {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 12px;
  color: var(--color-text-tertiary);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* --- Responsive --- */
@media (max-width: 640px) {
  .site-wrapper {
    padding: 0 20px;
  }

  .hero {
    padding: 48px 0 36px;
  }

  .hero-title {
    font-size: 22px;
  }

  .product-card {
    padding: 24px;
  }

  .product-screenshot--main {
    height: 180px;
  }

  .app-screenshot-item {
    flex: 0 0 55%;
  }

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

  .page-header {
    padding: 40px 0 8px;
  }

  .form-radios {
    flex-direction: column;
    gap: 10px;
  }

  .site-footer .site-wrapper {
    flex-direction: column;
    height: auto;
    padding-top: 20px;
    padding-bottom: 20px;
    gap: 8px;
  }
}
