/*
Theme Name: Oishi AI
Theme URI: https://oishillc.jp
Author: Oishi LLC
Description: AI Consulting Company Landing Page
Version: 5.2
Text Domain: oishi-ai
*/

/* ===== Design Tokens ===== */
:root {
  --bg: #ffffff;
  --bg-elevated: #f7f8fa;
  --bg-subtle: rgba(0, 0, 0, 0.02);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.16);
  --text-1: rgba(0, 0, 0, 0.88);
  --text-2: rgba(0, 0, 0, 0.62);
  --text-3: rgba(0, 0, 0, 0.44);
  --text-4: rgba(0, 0, 0, 0.28);
  --accent: rgba(0, 0, 0, 0.06);
  --accent-subtle: rgba(0, 0, 0, 0.02);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

::selection {
  background: rgba(0, 100, 200, 0.15);
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-logo {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo-img {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  flex-shrink: 0;
  display: inline-block;
  filter: none;
}

.header-nav {
  display: flex;
  gap: 20px;
  list-style: none;
  align-items: center;
}

.header-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-3);
  transition: color 0.2s;
}

.nav-ja {
  font-size: 0.6875rem;
  font-weight: 500;
}

.nav-en {
  font-size: 0.625rem;
  color: var(--text-4);
  letter-spacing: 0.04em;
}

.header-nav a:hover {
  color: var(--text-1);
}

.header-nav a:hover .nav-en {
  color: var(--text-3);
}

.nav-active {
  color: var(--text-1) !important;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-1);
  font-size: 1.25rem;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 60px clamp(24px, 5vw, 64px) 0;
  position: relative;
  background: url('hero-bg.jpg') center center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.hero-content {
  max-width: 720px;
  position: relative;
}

.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-1);
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-2);
  margin-bottom: 36px;
  line-height: 1.8;
}

.btn {
  display: inline-block;
  padding: 12px 36px;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s var(--ease);
}

.btn-primary {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-1);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
  background: rgba(0, 0, 0, 0.10);
  border-color: rgba(0, 0, 0, 0.20);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-1);
}

/* ===== Section Common ===== */
section {
  padding: clamp(80px, 10vw, 128px) 0;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 10px;
  letter-spacing: -0.025em;
}

.section-sub {
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto 48px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.8;
}

.text-center { text-align: center; }

/* ===== Use Cases ===== */
.usecases {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.usecases-list {
  max-width: 680px;
  margin: 0 auto;
  list-style: none;
}

.usecases-list li {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.usecases-list li:first-child {
  border-top: 1px solid var(--border);
}

.usecases-list .q {
  color: var(--text-1);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.6;
}

.usecases-list .a {
  font-size: 0.9375rem;
  color: var(--text-3);
  line-height: 1.7;
  padding-left: 16px;
  border-left: 2px solid var(--text-4);
}

/* ===== Services ===== */
.services {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.services .section-sub {
  max-width: 700px;
}

.services-grid {
  display: grid;
  gap: 16px;
}

.services-grid--seven {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.services-grid--seven > .service-card {
  grid-column: span 4;
}

.services-grid--seven > .service-card:nth-child(n + 4) {
  grid-column: span 3;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 28px;
  transition: border-color 0.25s, box-shadow 0.25s;
  position: relative;
}

.service-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.service-media {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, #f5f8fc 0%, #edf2f8 100%);
  margin-bottom: 16px;
}

.service-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s var(--ease);
}

.service-card:hover .service-media img {
  transform: scale(1.02);
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--text-3);
  line-height: 1.75;
}

/* ===== Strengths ===== */
.strengths {
  border-top: 1px solid var(--border);
}

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.strength-item {
  background: var(--bg);
  padding: 36px 32px;
}

.strength-num {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-4);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.strength-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.strength-item p {
  font-size: 0.9375rem;
  color: var(--text-3);
  line-height: 1.75;
}

/* ===== About ===== */
.about {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.about-table-wrap {
  max-width: 640px;
  margin: 0 auto;
}

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

.about-table th,
.about-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  text-align: left;
}

.about-table th {
  width: 100px;
  color: var(--text-3);
  font-weight: 400;
}

.about-table td {
  color: var(--text-2);
}

.about-message {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.about-message p {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 2;
}

.about-message .sig {
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-4);
}

/* ===== Flow ===== */
.flow {
  border-top: 1px solid var(--border);
}

.flow-track {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  position: relative;
}

.flow-track::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, var(--border), rgba(0, 0, 0, 0.10), var(--border));
  opacity: 0.5;
}

.flow-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 12px;
}

.flow-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
  position: relative;
  z-index: 1;
}

.flow-step:nth-child(2) .flow-dot {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(0, 0, 0, 0.03);
}

.flow-step h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.flow-step p {
  font-size: 0.9375rem;
  color: var(--text-3);
  line-height: 1.7;
}

/* ===== CTA ===== */
.cta {
  text-align: center;
  padding: clamp(100px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
  position: relative;
}

.cta::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-subtle), transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
}

.cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-1);
  letter-spacing: -0.02em;
}

.cta p {
  color: var(--text-2);
  margin-bottom: 32px;
  font-size: 1rem;
  line-height: 1.8;
}

/* ===== Contact Form ===== */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.contact-form__field {
  margin-bottom: 20px;
}

.contact-form__field label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: 6px;
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  font-family: var(--font);
  color: var(--text-1);
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  border-color: rgba(0, 0, 0, 0.24);
}

.contact-form__field textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn {
  width: 100%;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-family: var(--font);
}

.contact-msg {
  max-width: 560px;
  margin: 0 auto 24px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.contact-msg--success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.20);
  color: rgba(34, 197, 94, 0.9);
}

.contact-msg--error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.20);
  color: rgba(239, 68, 68, 0.9);
}

/* ===== Contact Page ===== */
.contact-hero {
  padding: 140px 0 40px;
}

.contact-hero .section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

.contact-section {
  padding: 0 0 clamp(80px, 10vw, 120px);
}

.contact-section .contact-form {
  margin: 0 auto;
}

.contact-section .contact-msg {
  margin: 0 auto 24px;
}

/* ===== Footer ===== */
.site-footer {
  padding: 24px 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-4);
  border-top: 1px solid var(--border);
}

.footer-links {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-3);
  font-size: 0.875rem;
  transition: color 0.2s;
}

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

/* ===== Portfolio ===== */
.portfolio-hero {
  padding: 140px 0 40px;
}

.portfolio-hero .section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

.portfolio-section {
  padding: 40px 0 clamp(80px, 10vw, 120px);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.portfolio-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.portfolio-card--featured {
  grid-column: 1 / -1;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 60%),
    var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.22);
}

.portfolio-card--featured h3 {
  font-size: 1.125rem;
}

.portfolio-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 2px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.portfolio-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.portfolio-category {
  font-size: 0.875rem;
  color: var(--text-4);
  font-weight: 400;
  margin-bottom: 14px;
}

.portfolio-desc {
  font-size: 0.9375rem;
  color: var(--text-3);
  line-height: 1.75;
  margin-bottom: 16px;
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portfolio-tech span {
  font-size: 0.8125rem;
  color: var(--text-3);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}

.portfolio-link:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.32);
}

/* ===== Blog ===== */
.blog-header {
  padding: 140px 0 60px;
  text-align: center;
}

.blog-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.blog-header p {
  font-size: 1rem;
  color: var(--text-3);
}

.blog-list {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 120px;
}

.blog-item {
  display: block;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.2s;
}

.blog-item:first-child {
  border-top: 1px solid var(--border);
}

.blog-item:hover {
  opacity: 0.7;
}

.blog-date {
  font-size: 0.8125rem;
  color: var(--text-4);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.blog-item h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 8px;
  line-height: 1.5;
}

.blog-item p {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.7;
}

.blog-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-3);
  font-size: 1rem;
}

/* ===== Blog Article ===== */
.blog-article {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 80px;
  font-size: 1rem;
  color: var(--text-2);
  line-height: 2;
}

.blog-article h2 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-1);
  margin: 48px 0 16px;
  letter-spacing: -0.02em;
}

.blog-article h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-1);
  margin: 36px 0 12px;
}

.blog-article p {
  margin-bottom: 24px;
}

.blog-article ul,
.blog-article ol {
  margin: 0 0 24px 20px;
}

.blog-article li {
  margin-bottom: 8px;
}

.blog-article a {
  color: var(--text-1);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--text-4);
}

.blog-article a:hover {
  text-decoration-color: var(--text-1);
}

.blog-article blockquote {
  border-left: 2px solid var(--text-4);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-3);
}

.blog-article code {
  font-size: 0.875em;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.blog-article pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.blog-article pre code {
  background: none;
  padding: 0;
}

.blog-article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
}

.blog-back {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 120px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 12px 24px 16px;
    gap: 10px;
    border-bottom: 1px solid var(--border);
  }

  .header-nav.open {
    display: flex;
  }

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .header-nav a {
    flex-direction: row;
    gap: 6px;
    align-items: baseline;
    padding: 8px 0;
  }

  .header-nav .nav-ja {
    font-size: 0.9375rem;
    font-weight: 600;
  }

  .header-nav .nav-en {
    font-size: 0.8125rem;
  }

  .hero {
    min-height: auto;
    padding: 120px 24px 80px;
  }

  .hero::before {
    width: 300px;
    height: 300px;
  }

  .services-grid,
  .services-grid.services-grid--seven {
    grid-template-columns: 1fr !important;
  }

  .services-grid--seven > .service-card,
  .services-grid--seven > .service-card:nth-child(n + 4) {
    grid-column: auto !important;
  }

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

  .flow-track {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .flow-track::before {
    top: 0;
    bottom: 0;
    left: 20px;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, var(--border), rgba(0, 0, 0, 0.10), var(--border));
  }

  .flow-step {
    text-align: left;
    padding-left: 56px;
  }

  .flow-dot {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
  }


  .contact-hero {
    padding: 120px 0 24px;
  }

  .portfolio-hero {
    padding: 120px 0 24px;
  }

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

  .cta::before {
    width: 280px;
    height: 280px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Blog Article Tables ===== */
.blog-article .about-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}

.blog-article table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.9375rem;
}

.blog-article thead {
  background: var(--bg-elevated);
}

.blog-article th {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-1);
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.blog-article td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
}

.blog-article tbody tr:last-child td {
  border-bottom: none;
}

.blog-article tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

/* ===== Blog Featured Image ===== */
.blog-featured-img {
  max-width: 680px;
  margin: 0 auto 32px;
}

.blog-featured-img img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}
